summaryrefslogtreecommitdiffstats
path: root/Python/thread_beos.h
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-01-19 22:02:55 (GMT)
committerFred Drake <fdrake@acm.org>2002-01-19 22:02:55 (GMT)
commit7bb1c9a11db2ecdf58fed5a5e3a7cdea619d52db (patch)
treeedd4767d8b3b2126fcd0084d3ed1a321bdf9b3a9 /Python/thread_beos.h
parent72c3bf076f785aaf54d63a7e8cae29bc8282920e (diff)
downloadcpython-7bb1c9a11db2ecdf58fed5a5e3a7cdea619d52db.zip
cpython-7bb1c9a11db2ecdf58fed5a5e3a7cdea619d52db.tar.gz
cpython-7bb1c9a11db2ecdf58fed5a5e3a7cdea619d52db.tar.bz2
Remove the unused & broken PyThread_*_sema() functions and related constants.
This closes SF patch #504215.
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;
- }
-}