summaryrefslogtreecommitdiff
path: root/components/libc/pthreads/pthread.h
diff options
context:
space:
mode:
authorluo jiao <[email protected]>2017-12-22 13:24:02 +0800
committerluo jiao <[email protected]>2017-12-22 13:24:02 +0800
commit3d65afc7d5c0e606712ecf90abb08f2edc159dfa (patch)
treed9fb4f192e50738a7103d84e16d701b3d5ac3466 /components/libc/pthreads/pthread.h
parent31151a775a32da61c1a3252c7f0684411f38ab80 (diff)
add some parameter check and function defintion etc.
Diffstat (limited to 'components/libc/pthreads/pthread.h')
-rw-r--r--components/libc/pthreads/pthread.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/components/libc/pthreads/pthread.h b/components/libc/pthreads/pthread.h
index dd1c5b5bd2..35fa817c0f 100644
--- a/components/libc/pthreads/pthread.h
+++ b/components/libc/pthreads/pthread.h
@@ -27,6 +27,7 @@
#include <rtthread.h>
#include <posix_types.h>
+#include <sched.h>
#define PTHREAD_KEY_MAX 8
@@ -139,6 +140,11 @@ 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);
@@ -146,6 +152,8 @@ int pthread_attr_setdetachstate(pthread_attr_t *attr, int state);
int pthread_attr_getdetachstate(pthread_attr_t const *attr, int *state);
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
int pthread_attr_getschedpolicy(pthread_attr_t const *attr, int *policy);
+int pthread_attr_setschedparam(pthread_attr_t *attr,struct sched_param const *param);
+int pthread_attr_getschedparam(pthread_attr_t const *attr,struct sched_param *param);
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stack_size);
int pthread_attr_getstacksize(pthread_attr_t const *attr, size_t *stack_size);
int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack_addr);
@@ -156,7 +164,10 @@ int pthread_attr_setstack(pthread_attr_t *attr,
int pthread_attr_getstack(pthread_attr_t const *attr,
void **stack_base,
size_t *stack_size);
-
+int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const *attr, size_t *guard_size);
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
int pthread_system_init(void);
int pthread_create (pthread_t *tid, const pthread_attr_t *attr,
void *(*start) (void *), void *arg);