search for: destr_function

Displaying 1 result from an estimated 1 matches for "destr_function".

Did you mean: testr_function
2008 May 22
0
[PATCH] stubdom: fix and clean pthread minimal support
...POSIX_PTHREAD_H +#include <stdlib.h> + /* Let''s be single-threaded for now. */ -typedef void *pthread_key_t; -typedef struct {} pthread_mutex_t, pthread_once_t; +typedef struct { + void *ptr; +} *pthread_key_t; +static inline int pthread_key_create(pthread_key_t *key, void (*destr_function)(void*)) +{ + *key = malloc(sizeof(**key)); + (*key)->ptr = NULL; + return 0; +} +static inline int pthread_setspecific(pthread_key_t key, const void *pointer) +{ + key->ptr = (void*) pointer; + return 0; +} +static inline void *pthread_getspecific(pthread_key_t key) +{ + re...