summaryrefslogtreecommitdiffstats
path: root/Python/thread_sgi.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-10-08 14:17:53 (GMT)
committerGuido van Rossum <guido@python.org>1996-10-08 14:17:53 (GMT)
commitcf1474b73ad3e4085af220f3845b75b201974d38 (patch)
tree3f0376625f60a95747ce8e83307a3b15cf077f89 /Python/thread_sgi.h
parent5b1d9bad3266b90d7d37b7f2543d22887c2623c9 (diff)
downloadcpython-cf1474b73ad3e4085af220f3845b75b201974d38.zip
cpython-cf1474b73ad3e4085af220f3845b75b201974d38.tar.gz
cpython-cf1474b73ad3e4085af220f3845b75b201974d38.tar.bz2
Sjoerd's thread changes (including down_sema typo fix).
Note: waitflag not supported on NT.
Diffstat (limited to 'Python/thread_sgi.h')
-rw-r--r--Python/thread_sgi.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/Python/thread_sgi.h b/Python/thread_sgi.h
index 654d4ae..79357a5 100644
--- a/Python/thread_sgi.h
+++ b/Python/thread_sgi.h
@@ -423,12 +423,19 @@ void free_sema _P1(sema, type_sema sema)
usfreesema((usema_t *) sema, shared_arena);
}
-void down_sema _P1(sema, type_sema sema)
+int down_sema _P2(sema, type_sema sema, waitflag, int waitflag)
{
+ int success;
+
dprintf(("down_sema(%lx) called\n", (long) sema));
- if (uspsema((usema_t *) sema) < 0)
- perror("uspsema");
+ if (waitflag)
+ success = uspsema((usema_t *) sema);
+ else
+ success = uscpsema((usema_t *) sema);
+ if (success < 0)
+ perror(waitflag ? "uspsema" : "uscpsema");
dprintf(("down_sema(%lx) return\n", (long) sema));
+ return success;
}
void up_sema _P1(sema, type_sema sema)