Loading...
Searching...
No Matches
pthread_threading_attr.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 René Kijewski <rene.kijewski@fu-berlin.de>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
25typedef struct
26{
27 uint8_t detached;
28 char *ss_sp;
29 size_t ss_size;
31
37 int todo; /* TODO */
38};
39
40#define PTHREAD_CREATE_JOINABLE (0)
41#define PTHREAD_CREATE_DETACHED (1)
42
51
58
65int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate);
66
76int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
77
84int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize);
85
92int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize);
93
101
109
116int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy);
117
125
132int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit);
133
141
148int pthread_attr_getscope(const pthread_attr_t *attr, int *scope);
149
157
165int pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr);
166
178int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr);
179
187int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize);
188
199int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
200
208int pthread_attr_getstack(pthread_attr_t *attr, void **stackaddr, size_t *stacksize);
209
226int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize);
227
228#ifdef __cplusplus
229}
230#endif
231
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.