patches to add thread-safe usleep() soft syscall wrapper.
-- From: vedge <vedge2@vedge.com.ar>
This commit is contained in:
parent
6b2a42a3ca
commit
a9434885b2
@ -1,10 +1,11 @@
|
|||||||
# $OpenBSD: Makefile,v 1.5 2001/03/26 23:54:42 brad Exp $
|
# $OpenBSD: Makefile,v 1.6 2001/05/24 00:07:13 brad Exp $
|
||||||
|
|
||||||
COMMENT= "GNU portable threads"
|
COMMENT= "GNU portable threads"
|
||||||
|
|
||||||
DISTNAME= pth-1.4.0
|
DISTNAME= pth-1.4.0
|
||||||
|
PKGNAME= ${DISTNAME}p1
|
||||||
CATEGORIES= devel
|
CATEGORIES= devel
|
||||||
NEED_VERSION= 1.363
|
NEED_VERSION= 1.402
|
||||||
MASTER_SITES= ${MASTER_SITE_GNU}
|
MASTER_SITES= ${MASTER_SITE_GNU}
|
||||||
MASTER_SITE_SUBDIR= pth
|
MASTER_SITE_SUBDIR= pth
|
||||||
|
|
||||||
|
16
devel/pth/patches/patch-pthread_c
Normal file
16
devel/pth/patches/patch-pthread_c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
$OpenBSD: patch-pthread_c,v 1.1 2001/05/24 00:07:15 brad Exp $
|
||||||
|
--- pthread.c.orig Mon May 21 11:19:33 2001
|
||||||
|
+++ pthread.c Mon May 21 11:21:18 2001
|
||||||
|
@@ -1057,6 +1057,12 @@
|
||||||
|
return pth_sleep(sec);
|
||||||
|
}
|
||||||
|
|
||||||
|
+int __pthread_usleep(unsigned int sec)
|
||||||
|
+{
|
||||||
|
+ pthread_initialize();
|
||||||
|
+ return pth_usleep(sec);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int __pthread_sigwait(const sigset_t *set, int *sig)
|
||||||
|
{
|
||||||
|
pthread_initialize();
|
19
devel/pth/patches/patch-pthread_h_in
Normal file
19
devel/pth/patches/patch-pthread_h_in
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
$OpenBSD: patch-pthread_h_in,v 1.1 2001/05/24 00:07:15 brad Exp $
|
||||||
|
--- pthread.h.in.orig Mon May 21 11:18:42 2001
|
||||||
|
+++ pthread.h.in Mon May 21 11:19:27 2001
|
||||||
|
@@ -483,6 +483,7 @@
|
||||||
|
|
||||||
|
extern pid_t __pthread_fork(void);
|
||||||
|
extern unsigned int __pthread_sleep(unsigned int);
|
||||||
|
+extern int __pthread_usleep(unsigned int);
|
||||||
|
extern int __pthread_sigwait(const sigset_t *, int *);
|
||||||
|
extern pid_t __pthread_waitpid(pid_t, int *, int);
|
||||||
|
extern int __pthread_connect(int, struct sockaddr *, socklen_t);
|
||||||
|
@@ -503,6 +504,7 @@
|
||||||
|
#if _POSIX_THREAD_SYSCALL_SOFT && !defined(_PTHREAD_PRIVATE)
|
||||||
|
#define fork __pthread_fork
|
||||||
|
#define sleep __pthread_sleep
|
||||||
|
+#define usleep __pthread_usleep
|
||||||
|
#define sigwait __pthread_sigwait
|
||||||
|
#define waitpid __pthread_waitpid
|
||||||
|
#define connect __pthread_connect
|
Loading…
x
Reference in New Issue
Block a user