1
/******************************************************
2
The interface to the operating system
3
process control primitives
7
Created 9/30/1995 Heikki Tuuri
8
*******************************************************/
21
/********************************************************************
22
Allocates non-cacheable memory. */
27
/* out: allocated memory */
28
ulint n) /* in: number of bytes */
33
ptr = VirtualAlloc(NULL, n, MEM_COMMIT,
34
PAGE_READWRITE | PAGE_NOCACHE);
44
/********************************************************************
45
Creates a new process. */
50
char* name, /* in: name of the executable to start
51
or its full path name */
52
char* cmd, /* in: command line for the starting
53
process, or NULL if no command line
55
os_process_t* proc, /* out: handle to the process */
56
os_process_id_t* id) /* out: process id */
60
PROCESS_INFORMATION pinfo;
63
/* The following assignments are default for the startupinfo
65
sinfo.cb = sizeof(STARTUPINFO);
66
sinfo.lpReserved = NULL;
67
sinfo.lpDesktop = NULL;
68
sinfo.cbReserved2 = 0;
69
sinfo.lpReserved = NULL;
71
ret = CreateProcess(name,
73
NULL, /* No security attributes */
74
NULL, /* No thread security attrs */
75
FALSE, /* Do not inherit handles */
76
0, /* No creation flags */
77
NULL, /* No environment */
78
NULL, /* Same current directory */
82
*proc = pinfo.hProcess;
83
*id = pinfo.dwProcessId;
88
/**************************************************************************
94
ulint code) /* in: exit code */
96
ExitProcess((UINT)code);
99
/**************************************************************************
100
Gets a process exit code. */
103
os_process_get_exit_code(
104
/*=====================*/
105
/* out: TRUE if succeed, FALSE if fail */
106
os_process_t proc, /* in: handle to the process */
107
ulint* code) /* out: exit code */
112
ret = GetExitCodeProcess(proc, &ex_code);
114
*code = (ulint)ex_code;
118
#endif /* notdedfined */
120
/********************************************************************
121
Sets the priority boost for threads released from waiting within the current
125
os_process_set_priority_boost(
126
/*==========================*/
127
ibool do_boost) /* in: TRUE if priority boost should be done,
141
/* Does not do anything currently!
142
SetProcessPriorityBoost(GetCurrentProcess(), no_boost);
145
"Warning: process priority boost setting currently not functional!\n"
148
UT_NOT_USED(do_boost);