lwp: Don't cast returns from malloc()
[openafs.git] / src / lwp / preempt.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*******************************************************************\
11 *                                                                   *
12 *       Information Technology Center                               *
13 *       Carnegie-Mellon University                                  *
14 *                                                                   *
15 \*******************************************************************/
16
17 #if defined( _WIN32)
18 #define PRE_InitPreempt(A)
19 #endif
20
21 #if defined( _WIN32) || defined(AFS_LINUX20_ENV)
22 /* preemption not implemented for win32. Use threads instead. */
23 #define PRE_PreemptMe()
24 #define PRE_BeginCritical()
25 #define PRE_EndCritical()
26 #else
27 #define PRE_PreemptMe()         lwp_cpptr->level = 0
28 #define PRE_BeginCritical()     lwp_cpptr->level++
29 #define PRE_EndCritical()       lwp_cpptr->level--
30 #endif
31
32 #define DEFAULTSLICE    10