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 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 24 critical_enter(void) 25 { 26 thread_pin_to_current_cpu(thread_get_current_thread()); 27 } 28 29 30 void 31 critical_exit(void) 32 { 33 thread_unpin_from_current_cpu(thread_get_current_thread()); 34 } 35 36 37 void 38 freeenv(char *env) 39 { 40 } 41 42 43 char * 44 getenv(const char *name) 45 { 46 return NULL; 47 } 48 49 50 char * 51 kern_getenv(const char *name) 52 { 53 return NULL; 54 } 55 56