Loading...
Searching...
No Matches
pthread_threading_attr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de>
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
17#ifndef PTHREAD_THREADING_ATTR_H
18#define PTHREAD_THREADING_ATTR_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
29typedef struct
30{
31 uint8_t detached;
32 char *ss_sp;
33 size_t ss_size;
35
41 int todo; /* TODO */
42};
43
44#define PTHREAD_CREATE_JOINABLE (0)
45#define PTHREAD_CREATE_DETACHED (1)
55
62
69int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate);
70
80int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
81
88int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize);
89
96int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize);
97
105
113
120int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy);
121
129
136int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit);
137
145
152int pthread_attr_getscope(const pthread_attr_t *attr, int *scope);
153
161
169int pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr);
170
182int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr);
183
191int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize);
192
203int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
204
212int pthread_attr_getstack(pthread_attr_t *attr, void **stackaddr, size_t *stacksize);
213
230int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize);
231
232#ifdef __cplusplus
233}
234#endif
235
236#endif /* PTHREAD_THREADING_ATTR_H */
237
int pthread_attr_init(pthread_attr_t *attr)
Initialize attributes for a new pthread.
int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_setscope(pthread_attr_t *attr, int scope)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
Set address of the stack to use for the new pthread.
int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
Tells whether to create a new pthread in a detached state.
int pthread_attr_destroy(pthread_attr_t *attr)
Destroys an attribute set.
int pthread_attr_getstack(pthread_attr_t *attr, void **stackaddr, size_t *stacksize)
Query set stacksize for new pthread.
int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
Set the stack size for the new pthread.
int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize)
Set address and stack size of the stack to use for the new pthread.
int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_getscope(const pthread_attr_t *attr, int *scope)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
Query assigned stack for new pthread.
int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize)
Query set stacksize for new pthread.
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
Sets whether to create a new pthread in a detached state.
int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
This function is unused right now, and only exists for POSIX compatibility.
int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param)
This function is unused right now, and only exists for POSIX compatibility.
An attribute set to supply to pthread_create()
uint8_t detached
Start in detached state.
size_t ss_size
Size of dynamically allocated stack, or supplied stack, resp.
char * ss_sp
Stack to use for new thread.
This structure is unused right now, and only exists for POSIX compatibility.
int todo
Todo is the greates magician in the land of RIOT.