forkables: inline dll_list::forkables_supported
And LONG fits better for shared_info member forkable_hardlink_support.
This commit is contained in:
		
							parent
							
								
									135577f708
								
							
						
					
					
						commit
						22d68bada3
					
				|  | @ -15,13 +15,13 @@ details. */ | ||||||
| #include "path.h" | #include "path.h" | ||||||
| #include "fhandler.h" | #include "fhandler.h" | ||||||
| #include "dtable.h" | #include "dtable.h" | ||||||
| #include "dll_init.h" |  | ||||||
| #include "cygheap.h" | #include "cygheap.h" | ||||||
| #include "perprocess.h" | #include "perprocess.h" | ||||||
| #include "cygtls.h" | #include "cygtls.h" | ||||||
| #include "tls_pbuf.h" | #include "tls_pbuf.h" | ||||||
| #include "ntdll.h" | #include "ntdll.h" | ||||||
| #include "shared_info.h" | #include "shared_info.h" | ||||||
|  | #include "dll_init.h" | ||||||
| #include "pathfinder.h" | #include "pathfinder.h" | ||||||
| 
 | 
 | ||||||
| /* Dumb allocator using memory from tmp_pathbuf.w_get ().
 | /* Dumb allocator using memory from tmp_pathbuf.w_get ().
 | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ details. */ | ||||||
| #include "cygerrno.h" | #include "cygerrno.h" | ||||||
| #include "perprocess.h" | #include "perprocess.h" | ||||||
| #include "sync.h" | #include "sync.h" | ||||||
|  | #include "shared_info.h" | ||||||
| #include "dll_init.h" | #include "dll_init.h" | ||||||
| #include "environ.h" | #include "environ.h" | ||||||
| #include "security.h" | #include "security.h" | ||||||
|  |  | ||||||
|  | @ -86,8 +86,10 @@ struct dll | ||||||
| 
 | 
 | ||||||
| class dll_list | class dll_list | ||||||
| { | { | ||||||
|   /* forkables */ |   bool forkables_supported () | ||||||
|   bool forkables_supported (); |   { | ||||||
|  |     return cygwin_shared->forkable_hardlink_support >= 0; | ||||||
|  |   } | ||||||
|   DWORD forkables_dirx_size; |   DWORD forkables_dirx_size; | ||||||
|   bool forkables_created; |   bool forkables_created; | ||||||
|   PWCHAR forkables_dirx_ntname; |   PWCHAR forkables_dirx_ntname; | ||||||
|  |  | ||||||
|  | @ -20,6 +20,7 @@ details. */ | ||||||
| #include "child_info.h" | #include "child_info.h" | ||||||
| #include "cygtls.h" | #include "cygtls.h" | ||||||
| #include "tls_pbuf.h" | #include "tls_pbuf.h" | ||||||
|  | #include "shared_info.h" | ||||||
| #include "dll_init.h" | #include "dll_init.h" | ||||||
| #include "cygmalloc.h" | #include "cygmalloc.h" | ||||||
| #include "ntdll.h" | #include "ntdll.h" | ||||||
|  |  | ||||||
|  | @ -10,7 +10,6 @@ details. */ | ||||||
| #include "cygerrno.h" | #include "cygerrno.h" | ||||||
| #include "perprocess.h" | #include "perprocess.h" | ||||||
| #include "sync.h" | #include "sync.h" | ||||||
| #include "dll_init.h" |  | ||||||
| #include "environ.h" | #include "environ.h" | ||||||
| #include "security.h" | #include "security.h" | ||||||
| #include "path.h" | #include "path.h" | ||||||
|  | @ -19,6 +18,7 @@ details. */ | ||||||
| #include "cygheap.h" | #include "cygheap.h" | ||||||
| #include "pinfo.h" | #include "pinfo.h" | ||||||
| #include "shared_info.h" | #include "shared_info.h" | ||||||
|  | #include "dll_init.h" | ||||||
| #include "child_info.h" | #include "child_info.h" | ||||||
| #include "cygtls.h" | #include "cygtls.h" | ||||||
| #include "exception.h" | #include "exception.h" | ||||||
|  | @ -501,12 +501,6 @@ dll::create_forkable () | ||||||
|   return false; |   return false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool |  | ||||||
| dll_list::forkables_supported () |  | ||||||
| { |  | ||||||
|   return cygwin_shared->forkable_hardlink_support >= 0; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* return the number of characters necessary to store one forkable name */ | /* return the number of characters necessary to store one forkable name */ | ||||||
| size_t | size_t | ||||||
| dll_list::forkable_ntnamesize (dll_type type, PCWCHAR fullntname, PCWCHAR modname) | dll_list::forkable_ntnamesize (dll_type type, PCWCHAR fullntname, PCWCHAR modname) | ||||||
|  |  | ||||||
|  | @ -33,7 +33,7 @@ public: | ||||||
| /* Data accessible to all tasks */ | /* Data accessible to all tasks */ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #define CURR_SHARED_MAGIC 0xc590e67eU | #define CURR_SHARED_MAGIC 0x9f33cc5dU | ||||||
| 
 | 
 | ||||||
| #define USER_VERSION   1 | #define USER_VERSION   1 | ||||||
| 
 | 
 | ||||||
|  | @ -51,7 +51,7 @@ class shared_info | ||||||
|   mtinfo mt; |   mtinfo mt; | ||||||
|   loadavginfo loadavg; |   loadavginfo loadavg; | ||||||
|   LONG pid_src; |   LONG pid_src; | ||||||
|   char forkable_hardlink_support; /* single byte access always is atomic */ |   LONG forkable_hardlink_support; | ||||||
| 
 | 
 | ||||||
|   void initialize (); |   void initialize (); | ||||||
|   void init_obcaseinsensitive (); |   void init_obcaseinsensitive (); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue