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
45
int
pthread_spin_lock
(
pthread_spinlock_t
*lock);
46
52
int
pthread_spin_unlock
(
pthread_spinlock_t
*lock);
53
59
int
pthread_spin_destroy
(
pthread_spinlock_t
*lock);
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
libc
pthread.h
Generated by
1.8.19