Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lockerror.c File Reference

implementation and definitions for error-handling on low-level locking More...

Go to the source code of this file.

Description

implementation and definitions for error-handling on low-level locking

Definition in file lockerror.c.

#include "lib/lockerror.h"
#include <errno.h>

Functions

 LUMIERA_ERROR_DEFINE (LOCK_ACQUIRE, "locking failed")
 
 LUMIERA_ERROR_DEFINE (LOCK_RELEASE, "unlocking failed")
 
 LUMIERA_ERROR_DEFINE (LOCK_DESTROY, "lock destroy failed")
 
 LUMIERA_ERROR_DEFINE (LOCK_INVAL, "lock initialisation error")
 
 LUMIERA_ERROR_DEFINE (LOCK_BUSY, "already locked")
 
 LUMIERA_ERROR_DEFINE (LOCK_DEADLK, "already locked by this thread")
 
 LUMIERA_ERROR_DEFINE (LOCK_PERM, "not locked by this thread")
 
 LUMIERA_ERROR_DEFINE (LOCK_TIMEOUT, "timeout")
 
 LUMIERA_ERROR_DEFINE (LOCK_AGAIN, "too much recursive locks")
 
void lumiera_lockerror_set (int err, struct nobug_flag *flag, const struct nobug_context ctx)
 Translate pthread error code into lumiera error.
 

Function Documentation

◆ LUMIERA_ERROR_DEFINE() [1/9]

LUMIERA_ERROR_DEFINE ( LOCK_ACQUIRE  ,
"locking failed"   
)

◆ LUMIERA_ERROR_DEFINE() [2/9]

LUMIERA_ERROR_DEFINE ( LOCK_RELEASE  ,
"unlocking failed"   
)

◆ LUMIERA_ERROR_DEFINE() [3/9]

LUMIERA_ERROR_DEFINE ( LOCK_DESTROY  ,
"lock destroy failed"   
)

◆ LUMIERA_ERROR_DEFINE() [4/9]

LUMIERA_ERROR_DEFINE ( LOCK_INVAL  ,
"lock initialisation error"   
)

◆ LUMIERA_ERROR_DEFINE() [5/9]

LUMIERA_ERROR_DEFINE ( LOCK_BUSY  ,
"already locked"   
)

◆ LUMIERA_ERROR_DEFINE() [6/9]

LUMIERA_ERROR_DEFINE ( LOCK_DEADLK  ,
"already locked by this thread"   
)

◆ LUMIERA_ERROR_DEFINE() [7/9]

LUMIERA_ERROR_DEFINE ( LOCK_PERM  ,
"not locked by this thread"   
)

◆ LUMIERA_ERROR_DEFINE() [8/9]

LUMIERA_ERROR_DEFINE ( LOCK_TIMEOUT  ,
"timeout"   
)

◆ LUMIERA_ERROR_DEFINE() [9/9]

LUMIERA_ERROR_DEFINE ( LOCK_AGAIN  ,
"too much recursive locks"   
)

◆ lumiera_lockerror_set()

void lumiera_lockerror_set ( int  err,
struct nobug_flag *  flag,
const struct nobug_context  ctx 
)

Translate pthread error code into lumiera error.

Definition at line 40 of file lockerror.c.

References LUMIERA_ERROR_SET, lumiera_error_set(), LUMIERA_ERROR_SET_ALERT, LUMIERA_ERROR_SET_CRITICAL, and LUMIERA_ERROR_SET_WARNING.

Referenced by lumiera_mutex_timedlock(), lumiera_mutex_trylock(), lumiera_recmutex_timedlock(), and lumiera_recmutex_trylock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: