xref: /haiku/src/libs/compat/freebsd_network/systm.cpp (revision c70ec71d0cfb6524c270d54b83cb1a38903412da)
1 /*
2  * Copyright 2012, Jérôme Duval, korli@users.berlios.de.
3  * Copyright 2018, Haiku, Inc.
4  * All rights reserved. Distributed under the terms of the MIT License.
5  */
6 
7 extern "C" {
8 #include <compat/sys/systm.h>
9 #include <compat/sys/kernel.h>
10 }
11 
12 #include <thread.h>
13 
14 
15 int
_pause(const char * waitMessage,int timeout)16 _pause(const char* waitMessage, int timeout)
17 {
18 	KASSERT(timeout != 0, ("pause: timeout required"));
19 	return snooze(TICKS_2_USEC(timeout));
20 }
21 
22 
23 void
critical_enter(void)24 critical_enter(void)
25 {
26 	thread_pin_to_current_cpu(thread_get_current_thread());
27 }
28 
29 
30 void
critical_exit(void)31 critical_exit(void)
32 {
33 	thread_unpin_from_current_cpu(thread_get_current_thread());
34 }
35 
36 
37 void
freeenv(char * env)38 freeenv(char *env)
39 {
40 }
41 
42 
43 char *
getenv(const char * name)44 getenv(const char *name)
45 {
46 	return NULL;
47 }
48 
49 
50 char *
kern_getenv(const char * name)51 kern_getenv(const char *name)
52 {
53 	return NULL;
54 }
55 
56