aboutsummaryrefslogtreecommitdiffstats
path: root/common/threads.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-26 22:36:55 -0800
committerChris Robinson <[email protected]>2018-11-26 22:36:55 -0800
commit4c1fc3ae00ad4890708a8789539eea4556b0634c (patch)
tree129c6d28d716fdb3ee8bb9640cfad2d7a6bcfb6c /common/threads.cpp
parent2d45ec8dc360cbdf9f813db0b8286d8e11a432d9 (diff)
Remove unused almtx stuff
Diffstat (limited to 'common/threads.cpp')
-rw-r--r--common/threads.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/common/threads.cpp b/common/threads.cpp
index 489e5f5b..b4f471d7 100644
--- a/common/threads.cpp
+++ b/common/threads.cpp
@@ -78,24 +78,6 @@ void althrd_setname(const char *name)
}
-int almtx_init(almtx_t *mtx, int type)
-{
- if(!mtx) return althrd_error;
-
- type &= ~almtx_recursive;
- if(type != almtx_plain)
- return althrd_error;
-
- InitializeCriticalSection(mtx);
- return althrd_success;
-}
-
-void almtx_destroy(almtx_t *mtx)
-{
- DeleteCriticalSection(mtx);
-}
-
-
int alsem_init(alsem_t *sem, unsigned int initial)
{
*sem = CreateSemaphore(NULL, initial, INT_MAX, NULL);
@@ -158,46 +140,6 @@ void althrd_setname(const char *name)
}
-int almtx_init(almtx_t *mtx, int type)
-{
- int ret;
-
- if(!mtx) return althrd_error;
- if((type&~almtx_recursive) != 0)
- return althrd_error;
-
- if(type == almtx_plain)
- ret = pthread_mutex_init(mtx, NULL);
- else
- {
- pthread_mutexattr_t attr;
-
- ret = pthread_mutexattr_init(&attr);
- if(ret) return althrd_error;
-
- if(type == almtx_recursive)
- {
- ret = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-#ifdef HAVE_PTHREAD_MUTEXATTR_SETKIND_NP
- if(ret != 0)
- ret = pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE);
-#endif
- }
- else
- ret = 1;
- if(ret == 0)
- ret = pthread_mutex_init(mtx, &attr);
- pthread_mutexattr_destroy(&attr);
- }
- return ret ? althrd_error : althrd_success;
-}
-
-void almtx_destroy(almtx_t *mtx)
-{
- pthread_mutex_destroy(mtx);
-}
-
-
#ifdef __APPLE__
int alsem_init(alsem_t *sem, unsigned int initial)