Init
This commit is contained in:
commit
4e066bffc9
10017 changed files with 1322084 additions and 0 deletions
27
node_modules/fsevents/src/locking.cc
generated
vendored
Normal file
27
node_modules/fsevents/src/locking.cc
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
** © 2014 by Philipp Dunkel <pip@pipobscure.com>
|
||||
** Licensed under MIT License.
|
||||
*/
|
||||
|
||||
void FSEvents::lockingStart() {
|
||||
if (lockStarted) return;
|
||||
lockStarted = true;
|
||||
pthread_mutex_init(&lockmutex, NULL);
|
||||
}
|
||||
|
||||
void FSEvents::lock() {
|
||||
if (!lockStarted) return;
|
||||
pthread_mutex_lock(&lockmutex);
|
||||
}
|
||||
|
||||
void FSEvents::unlock() {
|
||||
if (!lockStarted) return;
|
||||
pthread_mutex_unlock(&lockmutex);
|
||||
}
|
||||
|
||||
void FSEvents::lockingStop() {
|
||||
if (!lockStarted) return;
|
||||
lockStarted = false;
|
||||
|
||||
pthread_mutex_destroy(&lockmutex);
|
||||
}
|
||||
Loading…
Reference in a new issue