libaegis/lock.h File Reference

#include <common/main.h>

Go to the source code of this file.

Data Structures

struct  lock_walk_found

Typedefs

typedef void(* lock_callback_ty )(void *)
typedef void(* lock_walk_callback )(lock_walk_found *)

Enumerations

enum  lock_walk_name {
  lock_walk_name_master, lock_walk_name_gstate, lock_walk_name_pstate, lock_walk_name_cstate,
  lock_walk_name_baseline, lock_walk_name_baseline_priority, lock_walk_name_history, lock_walk_name_ustate,
  lock_walk_name_unknown
}
enum  lock_walk_type { lock_walk_type_shared, lock_walk_type_exclusive, lock_walk_type_unknown }

Functions

void lock_prepare_gstate (lock_callback_ty, void *)
void lock_prepare_pstate (struct string_ty *project_name, lock_callback_ty, void *)
void lock_prepare_ustate (int uid, lock_callback_ty, void *)
void lock_prepare_ustate_all (lock_callback_ty, void *)
void lock_prepare_cstate (struct string_ty *project_name, long change_number, lock_callback_ty, void *)
void lock_take (void)
void lock_release (void)
long lock_magic (void)
void lock_prepare_baseline_read (struct string_ty *project_name, lock_callback_ty, void *)
void lock_prepare_baseline_write (struct string_ty *project_name, lock_callback_ty, void *)
void lock_prepare_history (struct string_ty *project_name, lock_callback_ty, void *)
void lock_walk (lock_walk_callback)
void lock_release_child (void)
void lock_quitter (void)
bool lock_active (void)


Typedef Documentation

typedef void(* lock_callback_ty)(void *)

Definition at line 27 of file lock.h.

typedef void(* lock_walk_callback)(lock_walk_found *)

Definition at line 76 of file lock.h.


Enumeration Type Documentation

Enumerator:
lock_walk_name_master 
lock_walk_name_gstate 
lock_walk_name_pstate 
lock_walk_name_cstate 
lock_walk_name_baseline 
lock_walk_name_baseline_priority 
lock_walk_name_history 
lock_walk_name_ustate 
lock_walk_name_unknown 

Definition at line 46 of file lock.h.

Enumerator:
lock_walk_type_shared 
lock_walk_type_exclusive 
lock_walk_type_unknown 

Definition at line 59 of file lock.h.


Function Documentation

bool lock_active ( void   ) 

The lock_active function is used to determine wherther or not a lock is active (i.e. with lock_take/lock_release pair) or not. Ideally, it will be used in assert statements.

Returns:
true when between lock_take/lock_release, false if outside.

long lock_magic ( void   ) 

void lock_prepare_baseline_read ( struct string_ty project_name,
lock_callback_ty  ,
void *   
)

void lock_prepare_baseline_write ( struct string_ty project_name,
lock_callback_ty  ,
void *   
)

void lock_prepare_cstate ( struct string_ty project_name,
long  change_number,
lock_callback_ty  ,
void *   
)

void lock_prepare_gstate ( lock_callback_ty  ,
void *   
)

void lock_prepare_history ( struct string_ty project_name,
lock_callback_ty  ,
void *   
)

void lock_prepare_pstate ( struct string_ty project_name,
lock_callback_ty  ,
void *   
)

void lock_prepare_ustate ( int  uid,
lock_callback_ty  ,
void *   
)

void lock_prepare_ustate_all ( lock_callback_ty  ,
void *   
)

void lock_quitter ( void   ) 

The lock_quitetr function releases all locks. This function shall only be called by the quit_action_lock class.

void lock_release ( void   ) 

void lock_release_child ( void   ) 

void lock_take ( void   ) 

void lock_walk ( lock_walk_callback   ) 


Generated on Wed Mar 12 23:37:37 2008 for Aegis by  doxygen 1.5.5