source: golgotha/src/test/thread/thread.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: 1020 bytes
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 "main/main.hh"
10#include "file/file.hh"
11#include "memory/malloc.hh"
12#include "string/str_checksum.hh"
13#include "threads/threads.hh"
14#include <stdio.h>
15
16int done=0;
17
18void my_thread(void *arg)
19{
20  i4_directory_struct dir;
21
22  i4_get_directory(i4_const_str("/tmp/ctext"), dir, i4_T);
23 
24  done=1;
25}
26
27void i4_main(w32 argc, i4_const_str *argv)
28{
29  i4_init();
30
31  i4_add_thread(my_thread, 1024*1024, 0);
32  int count=0;
33  while (!done)
34    count++;
35
36  fprintf(stderr, "%d\n", count);
37
38
39  i4_uninit();
40}
Note: See TracBrowser for help on using the repository browser.