NewMadeleine

Documentation

nm_lock.h File Reference

Locking interface used in nm core. More...

#include <pthread.h>
Include dependency graph for nm_lock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static void nm_core_lock (struct nm_core *p_core)
 acquire the nm core lock More...
 
static int nm_core_trylock (struct nm_core *p_core)
 try to lock the nm core core return 1 is lock is successfully acquired, 0 otherwise More...
 
static void nm_core_unlock (struct nm_core *p_core)
 unlock the nm core lock More...
 
static void nm_core_lock_init (struct nm_core *p_core)
 init the core lock More...
 
static void nm_core_lock_destroy (struct nm_core *p_core)
 destroy the core lock More...
 
static void nm_core_nolock_assert (struct nm_core *p_core)
 assert that current thread doesn't hold the lock More...
 
static void nm_core_lock_assert (struct nm_core *p_core)
 assert that current thread holds the lock More...
 
static void nm_core_lock (struct nm_core *p_core __attribute__((unused)))
 
static int nm_core_trylock (struct nm_core *p_core __attribute__((unused)))
 
static void nm_core_unlock (struct nm_core *p_core __attribute__((unused)))
 
static void nm_core_lock_init (struct nm_core *p_core __attribute__((unused)))
 
static void nm_core_lock_destroy (struct nm_core *p_core __attribute__((unused)))
 
static void nm_core_lock_assert (struct nm_core *p_core __attribute__((unused)))
 
static void nm_core_nolock_assert (struct nm_core *p_core __attribute__((unused)))
 

Detailed Description

Locking interface used in nm core.

This is not part of the public API and may not be used to lock something else than nmad core.

Definition in file nm_lock.h.

Function Documentation

◆ nm_core_lock() [1/2]

static void nm_core_lock ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 58 of file nm_lock.h.

References nm_profile_inc, and nm_spin_lock().

Here is the call graph for this function:

◆ nm_core_lock() [2/2]

static void nm_core_lock ( struct nm_core p_core)
inlinestatic

acquire the nm core lock

◆ nm_core_lock_assert() [1/2]

static void nm_core_lock_assert ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 87 of file nm_lock.h.

References nm_spin_assert_locked().

Here is the call graph for this function:

◆ nm_core_lock_assert() [2/2]

static void nm_core_lock_assert ( struct nm_core p_core)
inlinestatic

assert that current thread holds the lock

Referenced by nm_core_polling_level(), nm_core_task_enqueue(), nm_gate_set_active(), nm_strat_gate_schedule(), nm_strat_pack_ctrl(), nm_strat_rdv_accept(), nm_strat_schedule(), and nm_strat_submit_req_chunk().

Here is the caller graph for this function:

◆ nm_core_lock_destroy() [1/2]

static void nm_core_lock_destroy ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 82 of file nm_lock.h.

References nm_spin_destroy().

Here is the call graph for this function:

◆ nm_core_lock_destroy() [2/2]

static void nm_core_lock_destroy ( struct nm_core p_core)
inlinestatic

destroy the core lock

◆ nm_core_lock_init() [1/2]

static void nm_core_lock_init ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 77 of file nm_lock.h.

References nm_spin_init().

Here is the call graph for this function:

◆ nm_core_lock_init() [2/2]

static void nm_core_lock_init ( struct nm_core p_core)
inlinestatic

init the core lock

◆ nm_core_nolock_assert() [1/2]

static void nm_core_nolock_assert ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 92 of file nm_lock.h.

References nm_spin_assert_notlocked().

Here is the call graph for this function:

◆ nm_core_nolock_assert() [2/2]

static void nm_core_nolock_assert ( struct nm_core p_core)
inlinestatic

assert that current thread doesn't hold the lock

Referenced by nm_core_task_enqueue(), nm_pw_completed_enqueue(), and nm_req_chunk_submit().

Here is the caller graph for this function:

◆ nm_core_trylock() [1/2]

static int nm_core_trylock ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 64 of file nm_lock.h.

References nm_profile_inc, and nm_spin_trylock().

Here is the call graph for this function:

◆ nm_core_trylock() [2/2]

static int nm_core_trylock ( struct nm_core p_core)
inlinestatic

try to lock the nm core core return 1 is lock is successfully acquired, 0 otherwise

Referenced by nm_core_task_enqueue().

Here is the caller graph for this function:

◆ nm_core_unlock() [1/2]

static void nm_core_unlock ( struct nm_core *p_core   __attribute__(unused))
inlinestatic

Definition at line 72 of file nm_lock.h.

References nm_spin_unlock().

Here is the call graph for this function:

◆ nm_core_unlock() [2/2]

static void nm_core_unlock ( struct nm_core p_core)
inlinestatic

unlock the nm core lock

Referenced by nm_core_task_enqueue().

Here is the caller graph for this function: