3 * Copyright (c) 1996 Regents of the University of Michigan.
6 * Redistribution and use in source and binary forms are permitted
7 * provided that this notice is preserved and that due credit is given
8 * to the University of Michigan at Ann Arbor. The name of the University
9 * may not be used to endorse or promote products derived from this
10 * software without specific prior written permission. This software
11 * is provided ``as is'' without express or implied warranty.
15 * ldap_pvt_thread_sleep.c - allow a thread to sleep without putting
16 * the whole process (e.g. pod under lwp) to sleep.
18 * Contains platform-specific code to allow this:
20 * Under non-preemptive threads packages like SunOS lwp, tsleep() adds
21 * the thread to a list of sleepers. The lwp_scheduler process takes
22 * care of resuming suspended threads.
24 * Under a fully-preemptive threads package, like Solaris threads,
25 * tsleep just calls sleep(), and there is no scheduler thread. Life
26 * is so much simpler...
31 #if !defined( HAVE_LWP )
34 #include <ac/stdlib.h>
35 #include <ac/unistd.h> /* get sleep() */
37 #include "ldap_pvt_thread.h"
41 * Here we assume we have fully preemptive threads and that sleep()
42 * does the right thing.
45 ldap_pvt_thread_sleep(
55 /* LWP implementation of sleep can be found in thr_lwp.c */