diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-02-20 22:39:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-02-20 22:39:56 +0000 |
commit | 630b4bdd3d2ca967f0e1d4f438f7f1761461dd31 (patch) | |
tree | f640e5eab1ce66cdeadd0ab3684ea326f56db8a5 /nuttx/include/pthread.h | |
parent | bd7dce092d36128a0f84e5544ccc857a45f6ba2f (diff) | |
download | nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.tar.gz nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.tar.bz2 nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.zip |
Eliminating GCC dependencies
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@14 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/pthread.h')
-rw-r--r-- | nuttx/include/pthread.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/nuttx/include/pthread.h b/nuttx/include/pthread.h index c15cf3e0f..c03e2a5fa 100644 --- a/nuttx/include/pthread.h +++ b/nuttx/include/pthread.h @@ -40,10 +40,11 @@ * Included Files ************************************************************/ -#include <nuttx/config.h> /* Default settings */ -#include <sys/types.h> /* Needed for general types */ -#include <semaphore.h> /* Needed for sem_t */ -#include <time.h> /* Needed for struct timespec */ +#include <nuttx/config.h> /* Default settings */ +#include <sys/types.h> /* Needed for general types */ +#include <semaphore.h> /* Needed for sem_t */ +#include <time.h> /* Needed for struct timespec */ +#include <nuttx/compiler.h> /* For noreturn_function */ /************************************************************ * Compilation Switches @@ -117,11 +118,7 @@ struct pthread_addr_s }; typedef struct pthread_addr_s pthread_attr_t; -struct pthread_s -{ - int pid; -}; -typedef struct pthread_s pthread_t; +typedef pid_t pthread_t; typedef int pthread_condattr_t; @@ -215,7 +212,7 @@ EXTERN int pthread_detach(pthread_t thread); * execution of another thread. *----------------------------------------------------------*/ -EXTERN void pthread_exit(pthread_addr_t pvValue) __attribute__ ((noreturn)); +EXTERN void pthread_exit(pthread_addr_t pvValue) noreturn_function; EXTERN int pthread_cancel(pthread_t thread); EXTERN int pthread_setcancelstate(int state, int *oldstate); EXTERN void pthread_testcancel(void); @@ -238,7 +235,7 @@ EXTERN void pthread_yield(void); * A thread may obtain a copy of its own thread handle. *----------------------------------------------------------*/ -EXTERN pthread_t pthread_self(void); +#define pthread_self() ((pthread_t)getpid()) /*----------------------------------------------------------* * Thread scheduling parameters |