Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a635184

Browse files
committed
Add waitflag to down_sema().
1 parent 6e8583d commit a635184

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Include/pythread.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ void release_lock Py_PROTO((type_lock));
3434

3535
type_sema allocate_sema Py_PROTO((int));
3636
void free_sema Py_PROTO((type_sema));
37-
void down_sema Py_PROTO((type_sema));
37+
int down_sema Py_PROTO((type_sema, int));
38+
#define WAIT_SEMA 1
39+
#define NOWAIT_SEMA 0
3840
void up_sema Py_PROTO((type_sema));
3941

4042
#ifndef NO_EXIT_PROG

Include/thread.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ void release_lock Py_PROTO((type_lock));
3434

3535
type_sema allocate_sema Py_PROTO((int));
3636
void free_sema Py_PROTO((type_sema));
37-
void down_sema Py_PROTO((type_sema));
37+
int down_sema Py_PROTO((type_sema, int));
38+
#define WAIT_SEMA 1
39+
#define NOWAIT_SEMA 0
3840
void up_sema Py_PROTO((type_sema));
3941

4042
#ifndef NO_EXIT_PROG

0 commit comments

Comments
 (0)