On Mon, May 21, 2001, vedge wrote:

> --- pthread.h.orig      Mon May 21 11:09:45 2001
> +++ pthread.h   Mon May 21 11:12:20 2001
> @@ -503,6 +503,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

Hmmm.. thanks for your feedback, but unfortunately it isn't such
easy and that's why usleep intentionally was left out of the syscall
mapping (for both Pth and Pthread APIs!). Because usleep(3) is defined
differently by different platforms. For instance, BSD defines it
"int usleep(unsigned int microseconds);", while SUSv2/POSIX defines
it as "int usleep(useconds_t useconds);". So, if we want to map
usleep to __pthread_usleep we have to provide a correctly prototyped
__pthread_usleep. Additionately, the above patch had to be extended to
also cover the __pthread_usleep prototype plus a patch to pthread.c for
actually implemeting __pthread_usleep on top of pth_usleep.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to