1-
21/*
32 * Initialization.
43 */
@@ -60,11 +59,19 @@ PyThread_free_lock(PyThread_type_lock lock)
6059
6160int
6261PyThread_acquire_lock (PyThread_type_lock lock , int waitflag )
62+ {
63+ return PyThread_acquire_lock_timed (lock , waitflag ? -1 : 0 , 0 );
64+ }
65+
66+ PyLockStatus
67+ PyThread_acquire_lock_timed (PyThread_type_lock lock , PY_TIMEOUT_T microseconds ,
68+ int intr_flag )
6369{
6470 int success ;
6571
66- dprintf (("PyThread_acquire_lock(%p, %d) called\n" , lock , waitflag ));
67- dprintf (("PyThread_acquire_lock(%p, %d) -> %d\n" , lock , waitflag , success ));
72+ dprintf (("PyThread_acquire_lock_timed(%p, %lld, %d) called\n" , lock , microseconds , intr_flag ));
73+ dprintf (("PyThread_acquire_lock_timed(%p, %lld, %d) -> %d\n" ,
74+ lock , microseconds , intr_flag , success ));
6875 return success ;
6976}
7077
@@ -73,3 +80,53 @@ PyThread_release_lock(PyThread_type_lock lock)
7380{
7481 dprintf (("PyThread_release_lock(%p) called\n" , lock ));
7582}
83+
84+ /* The following are only needed if native TLS support exists */
85+ #define Py_HAVE_NATIVE_TLS
86+
87+ #ifdef Py_HAVE_NATIVE_TLS
88+ int
89+ PyThread_create_key (void )
90+ {
91+ int result ;
92+ return result ;
93+ }
94+
95+ void
96+ PyThread_delete_key (int key )
97+ {
98+
99+ }
100+
101+ int
102+ PyThread_set_key_value (int key , void * value )
103+ {
104+ int ok ;
105+
106+ /* A failure in this case returns -1 */
107+ if (!ok )
108+ return -1 ;
109+ return 0 ;
110+ }
111+
112+ void *
113+ PyThread_get_key_value (int key )
114+ {
115+ void * result ;
116+
117+ return result ;
118+ }
119+
120+ void
121+ PyThread_delete_key_value (int key )
122+ {
123+
124+ }
125+
126+ void
127+ PyThread_ReInitTLS (void )
128+ {
129+
130+ }
131+
132+ #endif
0 commit comments