diff options
| author | Bernard Xiong <[email protected]> | 2019-05-12 15:04:46 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2019-05-12 15:04:46 +0800 |
| commit | 3638e5129ebca52190976ebd1f600af078996449 (patch) | |
| tree | fae9a20db84929078f635030cef3ea43aa9f59ce /components/libc/pthreads/pthread.h | |
| parent | 6e981106fb8f33838830403d9cbe41f7b4bed192 (diff) | |
[pthreads] The fields definition are more like those of newlib/glibc.
Diffstat (limited to 'components/libc/pthreads/pthread.h')
| -rw-r--r-- | components/libc/pthreads/pthread.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/components/libc/pthreads/pthread.h b/components/libc/pthreads/pthread.h index f9a0a92b68..c86ee90b0e 100644 --- a/components/libc/pthreads/pthread.h +++ b/components/libc/pthreads/pthread.h @@ -76,15 +76,21 @@ enum #define PTHREAD_SCOPE_PROCESS 0 #define PTHREAD_SCOPE_SYSTEM 1 +struct sched_param +{ + int sched_priority; +}; + struct pthread_attr { - void* stack_base; - rt_uint32_t stack_size; /* stack size of thread */ + void* stackaddr; /* stack address of thread */ + int stacksize; /* stack size of thread */ + + int inheritsched; /* Inherit parent prio/policy */ + int schedpolicy; /* scheduler policy */ + struct sched_param schedparam; /* sched parameter */ - rt_uint8_t priority; /* priority of thread */ - rt_uint8_t detachstate; /* detach state */ - rt_uint8_t policy; /* scheduler policy */ - rt_uint8_t inheritsched; /* Inherit parent prio/policy */ + int detachstate; /* detach state */ }; typedef struct pthread_attr pthread_attr_t; @@ -131,11 +137,6 @@ struct pthread_barrier }; typedef struct pthread_barrier pthread_barrier_t; -struct sched_param -{ - int sched_priority; -}; - /* pthread thread interface */ int pthread_attr_destroy(pthread_attr_t *attr); int pthread_attr_init(pthread_attr_t *attr); |
