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