-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spider: add lwip support of Trampoline OS, without the needs to defin…
…e NO_SYS=1
- Loading branch information
1 parent
0cfa5d5
commit 570ea98
Showing
4 changed files
with
682 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef LWIP_ARCH_SYS_ARCH_H | ||
#define LWIP_ARCH_SYS_ARCH_H | ||
|
||
#include "lwip/arch.h" | ||
|
||
#if !NO_SYS | ||
|
||
#define SYS_MBOX_NULL NULL | ||
#define SYS_SEM_NULL NULL | ||
|
||
#define MAX_NB_MUTEX 100 | ||
#define MAX_NB_SEM 40 | ||
#define MAX_NB_MBOX 10 | ||
|
||
typedef u32_t sys_prot_t; | ||
|
||
struct sys_sem; | ||
typedef struct sys_sem * sys_sem_t; | ||
#define sys_sem_valid(sem) (((sem) != NULL) && (*(sem) != NULL)) | ||
#define sys_sem_valid_val(sem) ((sem) != NULL) | ||
#define sys_sem_set_invalid(sem) do { if((sem) != NULL) { *(sem) = NULL; }}while(0) | ||
#define sys_sem_set_invalid_val(sem) do { (sem) = NULL; }while(0) | ||
|
||
struct sys_mutex; | ||
typedef struct sys_mutex * sys_mutex_t; | ||
#define sys_mutex_valid(mutex) sys_sem_valid(mutex) | ||
#define sys_mutex_set_invalid(mutex) sys_sem_set_invalid(mutex) | ||
|
||
struct sys_mbox; | ||
typedef struct sys_mbox * sys_mbox_t; | ||
#define sys_mbox_valid(mbox) sys_sem_valid(mbox) | ||
#define sys_mbox_valid_val(mbox) sys_sem_valid_val(mbox) | ||
#define sys_mbox_set_invalid(mbox) sys_sem_set_invalid(mbox) | ||
#define sys_mbox_set_invalid_val(mbox) sys_sem_set_invalid_val(mbox) | ||
|
||
struct sys_thread; | ||
typedef struct sys_thread * sys_thread_t; | ||
|
||
#endif /* !NO_SYS */ | ||
|
||
#endif /* LWIP_ARCH_SYS_ARCH_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.