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

Mutex state handle for locked code sections. More...

Go to the source code of this file.

Description

Mutex state handle for locked code sections.

Definition in file sectionlock.h.

#include <pthread.h>
#include <nobug.h>

Macros

#define LUMIERA_SECTION_UNLOCK_(section)
 Unlock the lock hold in a SECTION.
 

Typedefs

typedef void(* lumiera_sectionlock_unlock_fn) (void *, struct nobug_flag *flag, struct nobug_resource_user **handle, const struct nobug_context ctx)
 

Classes

struct  LumieraSectionlock
 sectionlock used to manage the state of mutexes. More...
 

Functions

static void lumiera_sectionlock_ensureunlocked (LumieraSectionlock self)
 

Typedef Documentation

◆ lumiera_sectionlock_unlock_fn

typedef void(* lumiera_sectionlock_unlock_fn) (void *, struct nobug_flag *flag, struct nobug_resource_user **handle, const struct nobug_context ctx)

Definition at line 25 of file sectionlock.h.

Macro Definition Documentation

◆ LUMIERA_SECTION_UNLOCK_

#define LUMIERA_SECTION_UNLOCK_ (   section)
Value:
do if ((section)->lock) \
{ \
(section)->unlock((section)->lock, (section)->flag, \
&(section)->rh, NOBUG_CONTEXT); \
(section)->lock = NULL; \
} while (0)
return NULL
Definition llist.h:586

Unlock the lock hold in a SECTION.

Parameters
sectionnamename used for the sectionlock instance
...some extra code to execute

Definition at line 57 of file sectionlock.h.

Function Documentation

◆ lumiera_sectionlock_ensureunlocked()

static void lumiera_sectionlock_ensureunlocked ( LumieraSectionlock  self)
inlinestatic

Definition at line 45 of file sectionlock.h.