Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtmutex_common.h File Reference
#include <linux/rtmutex.h>
#include "rtmutex.h"

Go to the source code of this file.

Data Structures

struct  rt_mutex_waiter
 

Macros

#define schedule_rt_mutex(_lock)   schedule()
 
#define RT_MUTEX_HAS_WAITERS   1UL
 
#define RT_MUTEX_OWNER_MASKALL   1UL
 

Functions

struct task_structrt_mutex_next_owner (struct rt_mutex *lock)
 
void rt_mutex_init_proxy_locked (struct rt_mutex *lock, struct task_struct *proxy_owner)
 
void rt_mutex_proxy_unlock (struct rt_mutex *lock, struct task_struct *proxy_owner)
 
int rt_mutex_start_proxy_lock (struct rt_mutex *lock, struct rt_mutex_waiter *waiter, struct task_struct *task, int detect_deadlock)
 
int rt_mutex_finish_proxy_lock (struct rt_mutex *lock, struct hrtimer_sleeper *to, struct rt_mutex_waiter *waiter, int detect_deadlock)
 

Macro Definition Documentation

#define RT_MUTEX_HAS_WAITERS   1UL

Definition at line 94 of file rtmutex_common.h.

#define RT_MUTEX_OWNER_MASKALL   1UL

Definition at line 95 of file rtmutex_common.h.

#define schedule_rt_mutex (   _lock)    schedule()

Definition at line 36 of file rtmutex_common.h.

Function Documentation

int rt_mutex_finish_proxy_lock ( struct rt_mutex lock,
struct hrtimer_sleeper to,
struct rt_mutex_waiter waiter,
int  detect_deadlock 
)

rt_mutex_finish_proxy_lock() - Complete lock acquisition : the rt_mutex we were woken on : the timeout, null if none. hrtimer should already have been started. : the pre-initialized rt_mutex_waiter : perform deadlock detection (1) or not (0)

Complete the lock acquisition started our behalf by another thread.

Returns: 0 - success <0 - error, one of -EINTR, -ETIMEDOUT, or -EDEADLK

Special API call for PI-futex requeue support

Definition at line 1019 of file rtmutex.c.

void rt_mutex_init_proxy_locked ( struct rt_mutex lock,
struct task_struct proxy_owner 
)

rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a proxy owner

: the rt_mutex to be locked :the task to set as owner

No locking. Caller has to do serializing itself Special API call for PI-futex support

Definition at line 909 of file rtmutex.c.

struct task_struct* rt_mutex_next_owner ( struct rt_mutex lock)
read

rt_mutex_next_owner - return the next owner of the lock

: the rt lock query

Returns the next owner of the lock or NULL

Caller has to serialize against other accessors to the lock itself.

Special API call for PI-futex support

Definition at line 995 of file rtmutex.c.

void rt_mutex_proxy_unlock ( struct rt_mutex lock,
struct task_struct proxy_owner 
)

rt_mutex_proxy_unlock - release a lock on behalf of owner

: the rt_mutex to be locked

No locking. Caller has to do serializing itself Special API call for PI-futex support

Definition at line 926 of file rtmutex.c.

int rt_mutex_start_proxy_lock ( struct rt_mutex lock,
struct rt_mutex_waiter waiter,
struct task_struct task,
int  detect_deadlock 
)

rt_mutex_start_proxy_lock() - Start lock acquisition for another task : the rt_mutex to take : the pre-initialized rt_mutex_waiter : the task to prepare : perform deadlock detection (1) or not (0)

Returns: 0 - task blocked on lock 1 - acquired the lock for task, caller should wake it up <0 - error

Special API call for FUTEX_REQUEUE_PI support.

Definition at line 948 of file rtmutex.c.