CACAO
Macros | Functions | Variables
lock.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUGLOCKS(format)
 
#define LOCK_INITIAL_LOCK_RECORDS   8
 
#define LOCK_INITIAL_HASHTABLE_SIZE   1613 /* a prime in the middle between 1024 and 2048 */
 
#define DEBUG_NAME   "finalizer"
 

Functions

static void lock_hashtable_init (void)
 
static uintptr_t * lock_lockword_get (java_handle_t *o)
 
static void lock_record_enter (threadobject *t, lock_record_t *lr)
 
static void lock_record_exit (threadobject *t, lock_record_t *lr)
 
static bool lock_record_wait (threadobject *t, lock_record_t *lr, s8 millis, s4 nanos)
 
static void lock_record_notify (threadobject *t, lock_record_t *lr, bool one)
 
void lock_init (void)
 
static lock_record_tlock_record_new (void)
 
static void lock_record_free (lock_record_t *lr)
 
static void lock_hashtable_grow (void)
 
static void lock_record_finalizer (java_handle_t *object, void *p)
 
static lock_record_tlock_hashtable_get (java_handle_t *o)
 
static void lock_hashtable_remove (threadobject *t, java_handle_t *o)
 
static void lock_inflate (java_handle_t *o, lock_record_t *lr)
 
static void sable_flc_waiting (uintptr_t lw_cache, threadobject *t, java_handle_t *o)
 
static void notify_flc_waiters (threadobject *t, java_handle_t *o)
 
bool lock_monitor_enter (java_handle_t *o)
 
bool lock_monitor_exit (java_handle_t *o)
 
static void lock_record_add_waiter (lock_record_t *lr, threadobject *t)
 
static void lock_record_remove_waiter (lock_record_t *lr, threadobject *t)
 
static void lock_monitor_wait (threadobject *t, java_handle_t *o, s8 millis, s4 nanos)
 
static void lock_monitor_notify (threadobject *t, java_handle_t *o, bool one)
 
bool lock_is_held_by_current_thread (java_handle_t *o)
 
void lock_wait_for_object (java_handle_t *o, s8 millis, s4 nanos)
 
void lock_notify_object (java_handle_t *o)
 
void lock_notify_all_object (java_handle_t *o)
 

Variables

static lock_hashtable_t lock_hashtable
 

Macro Definition Documentation

#define DEBUG_NAME   "finalizer"

Definition at line 533 of file lock.cpp.

#define DEBUGLOCKS (   format)
Value:
do { \
log_println format; \
} \
} while (0)
void log_println(const char *text,...)
Definition: logging.cpp:193
int opt_DebugLocks
Definition: options.cpp:169

Definition at line 62 of file lock.cpp.

#define LOCK_INITIAL_HASHTABLE_SIZE   1613 /* a prime in the middle between 1024 and 2048 */

Definition at line 83 of file lock.cpp.

#define LOCK_INITIAL_LOCK_RECORDS   8

Definition at line 81 of file lock.cpp.

Function Documentation

static lock_record_t* lock_hashtable_get ( java_handle_t o)
static

Definition at line 397 of file lock.cpp.

static void lock_hashtable_grow ( void  )
static

Definition at line 265 of file lock.cpp.

static void lock_hashtable_init ( void  )
static

Definition at line 243 of file lock.cpp.

static void lock_hashtable_remove ( threadobject t,
java_handle_t o 
)
static

Definition at line 474 of file lock.cpp.

static void lock_inflate ( java_handle_t o,
lock_record_t lr 
)
static

Definition at line 635 of file lock.cpp.

void lock_init ( void  )

Definition at line 154 of file lock.cpp.

bool lock_is_held_by_current_thread ( java_handle_t o)

Definition at line 1280 of file lock.cpp.

static uintptr_t * lock_lockword_get ( java_handle_t o)
inlinestatic

Definition at line 570 of file lock.cpp.

bool lock_monitor_enter ( java_handle_t o)

Definition at line 786 of file lock.cpp.

bool lock_monitor_exit ( java_handle_t o)

Definition at line 900 of file lock.cpp.

static void lock_monitor_notify ( threadobject t,
java_handle_t o,
bool  one 
)
static

Definition at line 1222 of file lock.cpp.

static void lock_monitor_wait ( threadobject t,
java_handle_t o,
s8  millis,
s4  nanos 
)
static

Definition at line 1112 of file lock.cpp.

void lock_notify_all_object ( java_handle_t o)

Definition at line 1359 of file lock.cpp.

void lock_notify_object ( java_handle_t o)

Definition at line 1340 of file lock.cpp.

static void lock_record_add_waiter ( lock_record_t lr,
threadobject t 
)
static

Definition at line 990 of file lock.cpp.

static void lock_record_enter ( threadobject t,
lock_record_t lr 
)
inlinestatic

Definition at line 591 of file lock.cpp.

static void lock_record_exit ( threadobject t,
lock_record_t lr 
)
inlinestatic

Definition at line 612 of file lock.cpp.

static void lock_record_finalizer ( java_handle_t object,
void p 
)
static

Definition at line 535 of file lock.cpp.

static void lock_record_free ( lock_record_t lr)
static

Definition at line 209 of file lock.cpp.

static lock_record_t* lock_record_new ( void  )
static

Definition at line 168 of file lock.cpp.

static void lock_record_notify ( threadobject t,
lock_record_t lr,
bool  one 
)
static

Definition at line 1170 of file lock.cpp.

static void lock_record_remove_waiter ( lock_record_t lr,
threadobject t 
)
static

Definition at line 1012 of file lock.cpp.

static bool lock_record_wait ( threadobject t,
lock_record_t lr,
s8  millis,
s4  nanos 
)
static

Definition at line 1041 of file lock.cpp.

void lock_wait_for_object ( java_handle_t o,
s8  millis,
s4  nanos 
)

Definition at line 1321 of file lock.cpp.

static void notify_flc_waiters ( threadobject t,
java_handle_t o 
)
static

Definition at line 729 of file lock.cpp.

static void sable_flc_waiting ( uintptr_t  lw_cache,
threadobject t,
java_handle_t o 
)
static

Definition at line 658 of file lock.cpp.

Variable Documentation

lock_hashtable_t lock_hashtable
static

Definition at line 127 of file lock.cpp.