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