|  |  |  |  | /home/brennan/n-sim/OrbisQuartus/server/l4/patches/lwip-ore/sys_arch.c File Reference#include <string.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <l4/thread/thread.h>
 #include <l4/lock/lock.h>
 #include <l4/semaphore/semaphore.h>
 #include "lwip/sys.h"
 #include "lwip/opt.h"
 #include "lwip/stats.h"
 #include "lwip/debug.h"
 
Go to the source code of this file. 
 Define Documentation
 
 
  
    | 
        
          | #define MAX_JIFFY_OFFSET   ((~0UL >> 1)-1) |  |  
 
  
    | 
        
          | #define SYS_MBOX_SIZE   128 |  |  
 
  
    | 
        
          | #define UMAX | ( | a, |  
          |  |  | b |  | ) | ((a) > (b) ? (a) : (b)) |  |  
 Function Documentation
 
 
  
    |  | 
sys_prot_t sys_arch_protect(void) 
This optional function does a "fast" critical region protection and returns the previous protection level. This function is only called during very short critical regions. An embedded system which supports ISR-based drivers might want to implement this function by disabling interrupts. Task-based systems might want to implement this by using a mutex or disabling tasking. This function should support recursive calls from the same task or interrupt. In other words, sys_arch_protect() could be called while already protected. In that case the return value indicates that it is already protected. 
sys_arch_protect() is only required if your port is supporting an operating system. 
 
Definition at line 457 of file sys_arch.c.     |  
 
 
  
    | 
        
          | struct sys_timeouts* sys_arch_timeouts | ( | void |  | ) |  |  |  
 
  
    |  | 
void sys_arch_unprotect(sys_prot_t pval) 
This optional function does a "fast" set of critical region protection to the value specified by pval. See the documentation for sys_arch_protect() for more information. This function is only required if your port is supporting an operating system. 
 
Definition at line 484 of file sys_arch.c.     |  
 
 
  
    | 
        
          | unsigned long sys_jiffies | ( | void |  | ) |  |  |  
 
  
    | 
        
          | void sys_mbox_free | ( | struct sys_mbox * | mbox | ) |  |  |  
 
 
  
    | 
        
          | void sys_mbox_post | ( | struct sys_mbox * | mbox, |  
          |  |  | void * | msg |  
          |  | ) |  |  |  
 
  
    | 
        
          | void sys_sem_free | ( | struct sys_sem * | sem | ) |  |  |  
 
 
  
    | 
        
          | void sys_sem_signal | ( | struct sys_sem * | sem | ) |  |  |  
 
  
    | 
        
          | sys_thread_t sys_thread_new | ( | void(*)(void *arg) | function, |  
          |  |  | void * | arg, |  
          |  |  | int | prio |  
          |  | ) |  |  |  
 
  
    | 
        
          | unsigned long sys_unix_now | ( | void |  | ) |  |  |  |