MOS Source Code
Loading...
Searching...
No Matches
futex.cpp File Reference
#include "mos/platform/platform_defs.hpp"
#include <mos/lib/structures/list.hpp>
#include <mos/lib/sync/spinlock.hpp>
#include <mos/locks/futex.hpp>
#include <mos/mm/paging/paging.hpp>
#include <mos/platform/platform.hpp>
#include <mos/syslog/printk.hpp>
#include <mos/tasks/schedule.hpp>
#include <mos/tasks/wait.hpp>
#include <mos/type_utils.hpp>
#include <mos/types.hpp>
#include <mos_stdlib.hpp>
+ Include dependency graph for futex.cpp:

Go to the source code of this file.

Classes

struct  futex_private_t
 

Typedefs

typedef ptr_t futex_key_t
 

Functions

static futex_key_t futex_get_key (const futex_word_t *futex)
 
bool futex_wait (futex_word_t *futex, futex_word_t expected)
 
bool futex_wake (futex_word_t *futex, size_t num_to_wake)
 

Variables

static list_head futex_list_head
 
static spinlock_t futex_list_lock
 

Typedef Documentation

◆ futex_key_t

typedef ptr_t futex_key_t

Definition at line 17 of file futex.cpp.

Function Documentation

◆ futex_get_key()

static futex_key_t futex_get_key ( const futex_word_t * futex)
static

Definition at line 29 of file futex.cpp.

Referenced by futex_wait(), and futex_wake().

+ Here is the call graph for this function:

◆ futex_wait()

bool futex_wait ( futex_word_t * futex,
futex_word_t expected )

Definition at line 37 of file futex.cpp.

+ Here is the call graph for this function:

◆ futex_wake()

bool futex_wake ( futex_word_t * futex,
size_t num_to_wake )

Definition at line 101 of file futex.cpp.

+ Here is the call graph for this function:

Variable Documentation

◆ futex_list_head

list_head futex_list_head
static

Definition at line 26 of file futex.cpp.

Referenced by futex_wait(), and futex_wake().

◆ futex_list_lock

spinlock_t futex_list_lock
static

Definition at line 27 of file futex.cpp.

Referenced by futex_wait(), and futex_wake().