no_threads.cc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #include <stdlib.h>
  9. #include "threads/threads.hh"
  10. #include "error/error.hh"
  11. #include "time/time.hh"
  12. #include "main/main.hh"
  13. i4_critical_section_class::i4_critical_section_class() {}
  14. void i4_critical_section_class::lock() {}
  15. void i4_critical_section_class::unlock() {}
  16. i4_critical_section_class::~i4_critical_section_class() {}
  17. i4_signal_object::i4_signal_object(char *name) {}
  18. void i4_signal_object::wait_signal() {}
  19. void i4_signal_object::signal() {}
  20. i4_signal_object::~i4_signal_object() {}
  21. i4_bool i4_threads_supported() { return i4_F; }
  22. // this will start the thread right away, regardless of how many threads are running
  23. void i4_add_thread(i4_thread_func_type fun, w32 stack_size, void *context)
  24. {
  25. i4_error("Threads not supported");
  26. }
  27. void i4_thread_yield() { i4_sleep(0); }
  28. void i4_wait_threads() {}
  29. int i4_get_thread_id() { return 0; }
  30. int i4_get_main_thread_id() { return 0; }
  31. void i4_suspend_other_threads() {}
  32. void i4_resume_other_threads() {}
  33. int i4_get_first_thread_id() { return 0; }
  34. i4_bool i4_get_next_thread_id(int last_id, int &id) { return i4_F; }
  35. void i4_get_thread_stack(int thread_id, void *&base, void *&top)
  36. {
  37. int t;
  38. base=i4_stack_base;
  39. top=(void *)(&t);
  40. }
  41. void i4_set_thread_priority(int thread_id, i4_thread_priority_type priority) { ;}