MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / ISC_mutex_init

Function ISC_mutex_init

src/common/isc_sync.cpp:2398–2422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2396
2397
2398int ISC_mutex_init(struct mtx* mutex, const TEXT* mutex_name)
2399{
2400/**************************************
2401 *
2402 * I S C _ m u t e x _ i n i t ( W I N _ N T )
2403 *
2404 **************************************
2405 *
2406 * Functional description
2407 * Initialize a mutex.
2408 *
2409 **************************************/
2410 char name_buffer[MAXPATHLEN];
2411
2412 if (!make_object_name(name_buffer, sizeof(name_buffer), mutex_name, "_mutex"))
2413 {
2414 return FB_FAILURE;
2415 }
2416
2417 if (initializeFastMutex(&mutex->mtx_fast, ISC_get_security_desc(), FALSE, name_buffer))
2418 return FB_SUCCESS;
2419
2420 fb_assert(GetLastError() != 0);
2421 return GetLastError();
2422}
2423
2424
2425void ISC_mutex_fini(struct mtx *mutex)

Callers 1

SharedMemoryBaseMethod · 0.85

Calls 3

make_object_nameFunction · 0.85
initializeFastMutexFunction · 0.85
ISC_get_security_descFunction · 0.85

Tested by

no test coverage detected