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 
9 #pragma once
10 
19 #include <time.h>
20 
21 #include "mutex.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
33 
42 
51 
61 
70 
78 int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime);
79 
90 
98 int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, int *prioceiling);
99 
108 int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *old_ceiling);
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
Mutex for thread synchronization.
int pthread_mutex_lock(pthread_mutex_t *mutex)
Lock and hold a mutex.
int pthread_mutex_trylock(pthread_mutex_t *mutex)
Try to lock a mutex.
int pthread_mutex_destroy(pthread_mutex_t *mutex)
Destroy a mutex.
int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr)
Initialize a mutex.
int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime)
Not implemented, yet.
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_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:32
Mutex structure.
Definition: mutex.h:39
This type is unused right now, and only exists for POSIX compatibility.