implemented Setup.hs to build boehm cpp libs and install them;
[hs-boehmgc.git] / gc-7.2 / include / private / pthread_stop_world.h
1 /*
2  * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
3  * Copyright (c) 1996 by Silicon Graphics.  All rights reserved.
4  * Copyright (c) 1998 by Fergus Henderson.  All rights reserved.
5  * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
6  * All rights reserved.
7  *
8  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
9  * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
10  *
11  * Permission is hereby granted to use or copy this program
12  * for any purpose,  provided the above notices are retained on all copies.
13  * Permission to modify the code and to distribute modified code is granted,
14  * provided the above notices are retained, and a notice that the code was
15  * modified is included with the above copyright notice.
16  */
17
18 #ifndef GC_PTHREAD_STOP_WORLD_H
19 #define GC_PTHREAD_STOP_WORLD_H
20
21 struct thread_stop_info {
22 #   ifndef GC_OPENBSD_THREADS
23       word last_stop_count;     /* GC_last_stop_count value when thread */
24                                 /* last successfully handled a suspend  */
25                                 /* signal.                              */
26 #   endif
27
28     ptr_t stack_ptr;            /* Valid only when stopped.             */
29
30 #   ifdef NACL
31       /* Grab NACL_GC_REG_STORAGE_SIZE pointers off the stack when      */
32       /* going into a syscall.  20 is more than we need, but it's an    */
33       /* overestimate in case the instrumented function uses any callee */
34       /* saved registers, they may be pushed to the stack much earlier. */
35       /* Also, on amd64 'push' puts 8 bytes on the stack even though    */
36       /* our pointers are 4 bytes.                                      */
37 #     define NACL_GC_REG_STORAGE_SIZE 20
38       ptr_t reg_storage[NACL_GC_REG_STORAGE_SIZE];
39 #   endif
40 };
41
42 GC_INNER void GC_stop_init(void);
43
44 #endif