/[eiffelstudio]/trunk/Delivery/studio/config/windows/templates/egc_dynlib.template
ViewVC logotype

Contents of /trunk/Delivery/studio/config/windows/templates/egc_dynlib.template

Parent Directory Parent Directory | Revision Log Revision Log


Revision 78108 - (show annotations)
Tue Apr 7 00:24:05 2009 UTC (10 years, 9 months ago) by manus
File size: 1086 byte(s)
Made compilable with recent runtime changes to track when a thread was created by the Eiffel runtime or not.

1 /********************
2 *** EGC_DYNLIB.C ***
3 ********************/
4
5 #include "egc_dynlib.h"
6 #include "eif_sig.h"
7
8 RT_LNK HANDLE ghInstance;
9 RT_LNK HINSTANCE eif_hInstance;
10 RT_LNK HINSTANCE eif_hPrevInstance;
11
12 extern void egc_init_plug();
13
14 void init_rt (void)
15 {
16 #ifdef EIF_THREADS
17 eif_thr_register(1);
18 initsig();
19 initstk();
20 #endif
21 }
22
23 BOOL WINAPI DllMain (HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpvReserved)
24 {
25 switch (ul_reason_for_call) {
26 case DLL_PROCESS_ATTACH:
27 ghInstance = hInst;
28 eif_hInstance = hInst;
29 eif_hPrevInstance = hInst;
30 {
31 int argc = 1;
32 char *argv[] = {"",""};
33
34 eif_alloc_init();
35 #ifdef EIF_THREADS
36 eif_thr_init_root ();
37 #endif
38 {
39 GTCX;
40 egc_init_plug();
41 initsig();
42 initstk();
43 eif_rtinit(argc, argv, (char **)0);
44 }
45 }
46 EIF_EXIT_EIFFEL;
47 break;
48 case DLL_PROCESS_DETACH:
49 EIF_ENTER_EIFFEL;
50 reclaim ();
51 break;
52 case DLL_THREAD_ATTACH:
53 init_rt();
54 EIF_EXIT_EIFFEL;
55 break;
56 case DLL_THREAD_DETACH:
57 EIF_ENTER_EIFFEL;
58 eif_thr_exit();
59 break;
60 }
61 return TRUE;
62 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23