forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththread.cpp
More file actions
53 lines (36 loc) · 939 Bytes
/
thread.cpp
File metadata and controls
53 lines (36 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/*++
Module Name:
thread.c
Abstract:
Implementation of the threads/process functions in the C runtime library
that are Windows specific.
--*/
#include "pal/palinternal.h"
#include "pal/dbgmsg.h"
#include "pal/init.h"
SET_DEFAULT_DEBUG_CHANNEL(CRT);
void
PAL_exit(int status)
{
PERF_ENTRY(exit);
ENTRY ("exit(status=%d)\n", status);
/* should also clean up any resources allocated by pal/cruntime, if any */
ExitProcess(status);
LOGEXIT ("exit returns void");
PERF_EXIT(exit);
}
int
PAL_atexit(void (__cdecl *function)(void))
{
int ret;
PERF_ENTRY(atexit);
ENTRY ("atexit(function=%p)\n", function);
ret = atexit(function);
LOGEXIT ("atexit returns int %d", ret);
PERF_EXIT(atexit);
return ret;
}