pthread_mutex.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
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_MUTEX_H
18 #define PTHREAD_MUTEX_H
19 
20 #include <time.h>
21 
22 #include "mutex.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
34 
42 int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr);
43 
51 int pthread_mutex_destroy(pthread_mutex_t *mutex);
52 
61 int pthread_mutex_trylock(pthread_mutex_t *mutex);
62 
70 int pthread_mutex_lock(pthread_mutex_t *mutex);
71 
79 int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime);
80 
90 int pthread_mutex_unlock(pthread_mutex_t *mutex);
91 
99 int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, int *prioceiling);
100 
109 int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *old_ceiling);
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* PTHREAD_MUTEX_H */
116 
int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *old_ceiling)
Not implemented, yet.
int pthread_mutex_unlock(pthread_mutex_t *mutex)
Unlock a mutex.
int pthread_mutex_destroy(pthread_mutex_t *mutex)
Destroy a mutex.
int pthread_mutex_trylock(pthread_mutex_t *mutex)
Try to lock a mutex.
int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr)
Initialize a mutex.
This type is unused right now, and only exists for POSIX compatibility.
int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime)
Not implemented, yet.
RIOT synchronization API.
Mutex structure.
Definition: mutex.h:36
Definition of struct timespec for the MSP430.
Definition: msp430_types.h:50
int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, int *prioceiling)
Not implemented, yet.
mutex_t pthread_mutex_t
Pthread mutexes are quite the same as RIOT mutexes.
Definition: pthread_mutex.h:33
int pthread_mutex_lock(pthread_mutex_t *mutex)
Lock and hold a mutex.