Lumiera  0.pre.03
»edit your freedom«
sectionlock.h File Reference

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>

Classes

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

Typedefs

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

Macros

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

Functions

static void lumiera_sectionlock_ensureunlocked (LumieraSectionlock self)
 

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)

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.