MyOS Libc
pthread.h
Go to the documentation of this file.
1 
5 #ifndef PTHREAD_H
6 #define PTHREAD_H
7 
8 #include <sys/types.h>
9 
10 typedef pid_t pthread_t;
11 typedef int pthread_attr_t;
12 typedef int pthread_spinlock_t;
13 
22 int pthread_create(pthread_t *restrict thread,
23  const pthread_attr_t *restrict attr,
24  void *(*start_routine)(void*), void *restrict arg);
25 
30 void pthread_exit(void *value_ptr);
31 
38 int pthread_spin_init(pthread_spinlock_t *lock, int pshared);
39 
46 
53 
60 
61 
62 
63 #endif
pthread_spinlock_t
int pthread_spinlock_t
Represents a spinlock.
Definition: pthread.h:12
pthread_spin_init
int pthread_spin_init(pthread_spinlock_t *lock, int pshared)
Definition: pthread.c:26
pthread_create
int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, void *(*start_routine)(void *), void *restrict arg)
Definition: pthread.c:9
pthread_spin_lock
int pthread_spin_lock(pthread_spinlock_t *lock)
Definition: pthread.c:31
pthread_attr_t
int pthread_attr_t
Created as dummy.
Definition: pthread.h:11
pthread_spin_destroy
int pthread_spin_destroy(pthread_spinlock_t *lock)
Definition: pthread.c:41
pthread_t
pid_t pthread_t
Represents a thread.
Definition: pthread.h:10
pthread_spin_unlock
int pthread_spin_unlock(pthread_spinlock_t *lock)
Definition: pthread.c:36
pthread_exit
void pthread_exit(void *value_ptr)
Definition: pthread.c:20