summaryrefslogtreecommitdiffstats
path: root/Python/thread_beos.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_beos.h')
-rw-r--r--Python/thread_beos.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/Python/thread_beos.h b/Python/thread_beos.h
index 74eab2e..82f99de 100644
--- a/Python/thread_beos.h
+++ b/Python/thread_beos.h
@@ -285,73 +285,3 @@ void PyThread_release_lock( PyThread_type_lock lock )
return;
}
}
-
-/* ----------------------------------------------------------------------
- * Semaphore support.
- *
- * Guido says not to implement this because it's not used anywhere;
- * I'll do it anyway, you never know when it might be handy, and it's
- * easy...
- */
-PyThread_type_sema PyThread_allocate_sema( int value )
-{
- sem_id sema;
-
- dprintf(("PyThread_allocate_sema called\n"));
-
- sema = create_sem( value, "python semaphore" );
- if( sema < B_NO_ERROR ) {
- /* TODO: that's bad, raise an exception */
- return 0;
- }
-
- dprintf(("PyThread_allocate_sema() -> %p\n", sema));
- return (PyThread_type_sema) sema;
-}
-
-void PyThread_free_sema( PyThread_type_sema sema )
-{
- status_t retval;
-
- dprintf(("PyThread_free_sema(%p) called\n", sema));
-
- retval = delete_sem( (sem_id)sema );
- if( retval != B_NO_ERROR ) {
- /* TODO: that's bad, raise an exception */
- return;
- }
-}
-
-int PyThread_down_sema( PyThread_type_sema sema, int waitflag )
-{
- status_t retval;
-
- dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag));
-
- if( waitflag ) {
- retval = acquire_sem( (sem_id)sema );
- } else {
- retval = acquire_sem_etc( (sem_id)sema, 1, B_TIMEOUT, 0 );
- }
-
- if( retval != B_NO_ERROR ) {
- /* TODO: that's bad, raise an exception */
- return 0;
- }
-
- dprintf(("PyThread_down_sema(%p) return\n", sema));
- return -1;
-}
-
-void PyThread_up_sema( PyThread_type_sema sema )
-{
- status_t retval;
-
- dprintf(("PyThread_up_sema(%p)\n", sema));
-
- retval = release_sem( (sem_id)sema );
- if( retval != B_NO_ERROR ) {
- /* TODO: that's bad, raise an exception */
- return;
- }
-}