latest SDK

This commit is contained in:
2021-12-14 00:28:25 -07:00
commit 68b10d413b
492 changed files with 80542 additions and 0 deletions

33
pfc/synchro_nix.cpp Normal file
View File

@@ -0,0 +1,33 @@
#include "pfc.h"
#ifndef _WIN32
namespace pfc {
void mutexBase::create( const pthread_mutexattr_t * attr ) {
if (pthread_mutex_init( &obj, attr) != 0) {
throw exception_bug_check();
}
}
void mutexBase::destroy() {
pthread_mutex_destroy( &obj );
}
void mutexBase::createRecur() {
mutexAttr a; a.setRecursive(); create(&a.attr);
}
void mutexBase::create( const mutexAttr & a ) {
create( & a.attr );
}
void readWriteLockBase::create( const pthread_rwlockattr_t * attr ) {
if (pthread_rwlock_init( &obj, attr) != 0) {
throw exception_bug_check();
}
}
void readWriteLockBase::create( const readWriteLockAttr & a) {
create(&a.attr);
}
}
#endif // _WIN32