source: golgotha/src/i4/threads/no_threads.cc @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 14 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.7 KB
Line 
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
9#include <stdlib.h>
10#include "threads/threads.hh"
11#include "error/error.hh"
12#include "time/time.hh"
13#include "main/main.hh"
14
15i4_critical_section_class::i4_critical_section_class() {}
16void i4_critical_section_class::lock() {}
17void i4_critical_section_class::unlock() {}
18i4_critical_section_class::~i4_critical_section_class() {}
19
20
21i4_signal_object::i4_signal_object(char *name) {}
22
23void i4_signal_object::wait_signal() {}
24void i4_signal_object::signal() {}
25i4_signal_object::~i4_signal_object() {}
26
27
28i4_bool i4_threads_supported() { return i4_F; }
29
30
31// this will start the thread right away, regardless of how many threads are running
32void i4_add_thread(i4_thread_func_type fun, w32 stack_size, void *context)
33{
34  i4_error("Threads not supported");
35}
36
37void i4_thread_yield() { i4_sleep(0); }
38
39void i4_wait_threads() {}
40int  i4_get_thread_id() { return 0; }
41int  i4_get_main_thread_id() { return 0; }
42
43
44void i4_suspend_other_threads() {}
45void i4_resume_other_threads() {}
46
47int i4_get_first_thread_id() { return 0; }
48i4_bool i4_get_next_thread_id(int last_id, int &id) { return i4_F; }
49
50void i4_get_thread_stack(int thread_id, void *&base, void *&top)
51{
52  int t;
53  base=i4_stack_base;
54  top=(void *)(&t);
55}
56
57
58void i4_set_thread_priority(int thread_id, i4_thread_priority_type priority) { ;}
Note: See TracBrowser for help on using the repository browser.