23 * permission. Furthermore if you modify this software you must label
24 * your software as modified software and not distribute it in such a
25 * fashion that it might be confused with the original M.I.T. software.
26 * M.I.T. makes no representations about the suitability of
27 * this software for any purpose. It is provided "as is" without express
28 * or implied warranty.
29 *
30 *
31 * Preliminary thread support.
32 */
33
34 #ifndef K5_THREAD_H
35 #define K5_THREAD_H
36
37 #ifdef _KERNEL
38
39 #include <sys/ksynch.h>
40
41 typedef kmutex_t k5_mutex_t;
42
43 #define K5_MUTEX_PARTIAL_INITIALIZER {0}
44
45 /* ARGSUSED */
46 static void k5_mutex_assert_locked(k5_mutex_t *m) { }
47
48 static int
49 k5_mutex_lock(k5_mutex_t *m)
50 {
51 mutex_enter(m);
52 return (0);
53 }
54
55 static int
56 k5_mutex_unlock(k5_mutex_t *m)
57 {
58 mutex_exit(m);
59 return(0);
60 }
61
62
63 #else /* _KERNEL */
|
23 * permission. Furthermore if you modify this software you must label
24 * your software as modified software and not distribute it in such a
25 * fashion that it might be confused with the original M.I.T. software.
26 * M.I.T. makes no representations about the suitability of
27 * this software for any purpose. It is provided "as is" without express
28 * or implied warranty.
29 *
30 *
31 * Preliminary thread support.
32 */
33
34 #ifndef K5_THREAD_H
35 #define K5_THREAD_H
36
37 #ifdef _KERNEL
38
39 #include <sys/ksynch.h>
40
41 typedef kmutex_t k5_mutex_t;
42
43 #define K5_MUTEX_PARTIAL_INITIALIZER {{NULL}}
44
45 /* ARGSUSED */
46 static void k5_mutex_assert_locked(k5_mutex_t *m) { }
47
48 static int
49 k5_mutex_lock(k5_mutex_t *m)
50 {
51 mutex_enter(m);
52 return (0);
53 }
54
55 static int
56 k5_mutex_unlock(k5_mutex_t *m)
57 {
58 mutex_exit(m);
59 return(0);
60 }
61
62
63 #else /* _KERNEL */
|