mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
aaf3503ea5
functions to dlls/kernel.
66 lines
1.8 KiB
C
66 lines
1.8 KiB
C
/*
|
|
* Win32 processes
|
|
*
|
|
* Copyright 1996, 1998 Alexandre Julliard
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#include "config.h"
|
|
#include "wine/port.h"
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#ifdef HAVE_UNISTD_H
|
|
# include <unistd.h>
|
|
#endif
|
|
#include "wine/library.h"
|
|
#include "file.h"
|
|
#include "wine/server.h"
|
|
|
|
unsigned int server_startticks;
|
|
|
|
/***********************************************************************
|
|
* ExitProcess (KERNEL32.@)
|
|
*/
|
|
void WINAPI ExitProcess( DWORD status )
|
|
{
|
|
LdrShutdownProcess();
|
|
SERVER_START_REQ( terminate_process )
|
|
{
|
|
/* send the exit code to the server */
|
|
req->handle = GetCurrentProcess();
|
|
req->exit_code = status;
|
|
wine_server_call( req );
|
|
}
|
|
SERVER_END_REQ;
|
|
exit( status );
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* GetTickCount (KERNEL32.@)
|
|
*
|
|
* Returns the number of milliseconds, modulo 2^32, since the start
|
|
* of the wineserver.
|
|
*/
|
|
DWORD WINAPI GetTickCount(void)
|
|
{
|
|
struct timeval t;
|
|
gettimeofday( &t, NULL );
|
|
return ((t.tv_sec * 1000) + (t.tv_usec / 1000)) - server_startticks;
|
|
}
|