fullock - Man Page

Fast User Level LOCK (FULLOCK) library for C/C++

Synopsis

Please see fullock.h for full description.

Description

fullock is an open-source software for user level lock library supported by Yahoo! JAPAN. It runs on user level and provides two types lock. One is a shared reader/writer lock which has the same functionality with pthread_rwlock. Another is a shared mutex lock which also has the same functionality with pthread_mutex.

Here is primary fullock features:

  1. fullock is a thread safety library which can be used for multi-processing as well as for multi-threading.
  2. fullock releases a mutex lock safely even if a lock owner process exit with 0 in which case OS doesn't release the lock.
  3. fullock provides a shared reader/writer lock. A lock owner thread can get another lock again without deadlock.

Please visit our website and get more details at:

https://github.com/yahoojapan/fullock

Functions

FULLOCK provides following programming interface:
void fullock_print_version(...)
bool fullock_set_no_robust(...)
bool fullock_set_low_robust(...)
bool fullock_set_high_robust(...)
bool fullock_set_noretry_allow_nomap(...)
bool fullock_set_noretry_deny_nomap(...)
bool fullock_set_retry_allow_nomap(...)
bool fullock_set_retry_deny_nomap(...)
bool fullock_set_no_freeunit(...)
bool fullock_set_fd_freeunit(...)
bool fullock_set_offset_freeunit(...)
bool fullock_set_robust_check_count(...)
bool fullock_reinitialize(...)
bool fullock_reinitialize_ex(...)
int fullock_mutex_lock(...)
int fullock_mutex_trylock(...)
int fullock_mutex_timedlock(...)
int fullock_mutex_unlock(...)
int fullock_rwlock_rdlock(...)
int fullock_rwlock_tryrdlock(...)
int fullock_rwlock_timedrdlock(...)
int fullock_rwlock_wrlock(...)
int fullock_rwlock_trywrlock(...)
int fullock_rwlock_timedwrlock(...)
int fullock_rwlock_unrwlock(...)
bool fullock_rwlock_islocked(...)
int fullock_cond_timedwait(...)
int fullock_cond_wait(...)
int fullock_cond_signal(...)
int fullock_cond_broadcast(...)

Environment

fullock uses useful environments for debug that change its behaviour.

FLCKDBGMODE

specifies debugging level: INFO/WAN/ERR/SILENT

FLCKDBGFILE

output file path for message(default: stderr)

FLCKAUTOINIT

specify YES/NO, if this environment has YES, fullock does not initialize shared memory file. This environment is for debugging.

FLCKROBUSTMODE

specify NO/LOW/HIGH for robust mode.

FLCKNOMAPMODE

specify ALLOW(ALLOW_NORETRY) / DENY(DENY_NORETRY) / ALLOW_RETRY / DENY_RETRY for fault tolerant. This value determines the behavior of the case can not be mapped.

FLCKFREEUNITMODE

specify NO/FD/OFFSET/ALWAYS, it specifies the open method of unit management area to be used in the reader/writer lock.

FLCKROBUSTCHKCNT

If fullock is operating in a high robust mode, this value sets the processing frequency for the deadlock detection.

FLCKUMASK

specify umask for the shared memory file which is made by fullock.

FLCKDIRPATH

specify directory path for the shared memory file which is made by fullock.

FLCKFILENAME

specify the shared memory file name which is made by fullock.

FLCKFILECNT

specify file count for the reader/writer lock.

FLCKOFFETCNT

specify offset count for the reader/writer lock.

FLCKLOCKERCNT

specify the process(thread) count for the reader/writer lock and mutex at same time.

FLCKNMTXCNT

specify count for named mutex.

FLCKNCONDCNT

specify count for named condition variable.

FLCKWAITERCNT

specify named condition waiter count for named condition variable.

See Also

The web site can be found at:

https://github.com/yahoojapan/fullock

Reporting Bugs

Please make sure you use the latest version in the web site:

https://github.com/yahoojapan/fullock

Then, please submit your questions or comments here:

https://github.com/yahoojapan/fullock/issues

Authors

Takeshi Nakatani <ggtakec@gmail.com>

Info

May 2015 FULLOCK