Subversion Repositories Kolibri OS

Rev

Rev 1805 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1805 Rev 5123
Line 1... Line 1...
1
#ifndef _HEADER_SYSTEM_PROCESS_H
1
#ifndef _HEADER_SYSTEM_PROCESS_H
2
#define _HEADER_SYSTEM_PROCESS_H
2
#define _HEADER_SYSTEM_PROCESS_H
Line 3... Line -...
3
 
-
 
4
#ifndef __MENUET__
3
 
5
#include 
4
#include 
6
#include 
-
 
Line -... Line 5...
-
 
5
#include 
-
 
6
 
-
 
7
#if defined _KOLIBRI
-
 
8
# define DIR_SEPARATOR  ('/')
-
 
9
  inline long GetProcessId() {return 0;}
-
 
10
  inline long DuplicateProcess() {return -1;}
7
#endif
11
  inline int random(int m) {return ((unsigned long)rand()) % m;}
8
 
12
  inline void randomize() {srand(__menuet__getsystemclock());}
9
#if defined __GNUC__
13
#elif defined __GNUC__
10
# include 
14
# include 
11
# define DIR_SEPARATOR	('/')
15
# define DIR_SEPARATOR	('/')
12
  inline long GetProcessId() {return (long)getpid();}
16
  inline long GetProcessId() {return (long)getpid();}
13
  inline long DuplicateProcess() {return (long)fork();}
17
  inline long DuplicateProcess() {return (long)fork();}
14
  inline int random(int m) {return ((unsigned long)rand()) % m;}
18
  inline int random(int m) {return ((unsigned long)rand()) % m;}
15
  inline void randomize() {srand(time(0));}
19
  inline void randomize() {srand(time(0));}
16
#elif defined __TURBOC__ && !defined __MENUET__
20
#elif defined __TURBOC__
17
# include 
21
# include 
18
# define DIR_SEPARATOR	('\\')
22
# define DIR_SEPARATOR	('\\')
19
  inline long GetProcessId() {return (long)getpid();}
23
  inline long GetProcessId() {return (long)getpid();}