4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

forkables: inline dll_list::forkables_supported

And LONG fits better for shared_info member forkable_hardlink_support.
This commit is contained in:
Michael Haubenwallner 2017-03-02 17:26:53 +01:00 committed by Corinna Vinschen
parent 135577f708
commit 22d68bada3
6 changed files with 10 additions and 12 deletions

View File

@ -15,13 +15,13 @@ details. */
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
#include "dll_init.h"
#include "cygheap.h"
#include "perprocess.h"
#include "cygtls.h"
#include "tls_pbuf.h"
#include "ntdll.h"
#include "shared_info.h"
#include "dll_init.h"
#include "pathfinder.h"
/* Dumb allocator using memory from tmp_pathbuf.w_get ().

View File

@ -8,6 +8,7 @@ details. */
#include "cygerrno.h"
#include "perprocess.h"
#include "sync.h"
#include "shared_info.h"
#include "dll_init.h"
#include "environ.h"
#include "security.h"

View File

@ -86,8 +86,10 @@ struct dll
class dll_list
{
/* forkables */
bool forkables_supported ();
bool forkables_supported ()
{
return cygwin_shared->forkable_hardlink_support >= 0;
}
DWORD forkables_dirx_size;
bool forkables_created;
PWCHAR forkables_dirx_ntname;

View File

@ -20,6 +20,7 @@ details. */
#include "child_info.h"
#include "cygtls.h"
#include "tls_pbuf.h"
#include "shared_info.h"
#include "dll_init.h"
#include "cygmalloc.h"
#include "ntdll.h"

View File

@ -10,7 +10,6 @@ details. */
#include "cygerrno.h"
#include "perprocess.h"
#include "sync.h"
#include "dll_init.h"
#include "environ.h"
#include "security.h"
#include "path.h"
@ -19,6 +18,7 @@ details. */
#include "cygheap.h"
#include "pinfo.h"
#include "shared_info.h"
#include "dll_init.h"
#include "child_info.h"
#include "cygtls.h"
#include "exception.h"
@ -501,12 +501,6 @@ dll::create_forkable ()
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 */
size_t
dll_list::forkable_ntnamesize (dll_type type, PCWCHAR fullntname, PCWCHAR modname)

View File

@ -33,7 +33,7 @@ public:
/* Data accessible to all tasks */
#define CURR_SHARED_MAGIC 0xc590e67eU
#define CURR_SHARED_MAGIC 0x9f33cc5dU
#define USER_VERSION 1
@ -51,7 +51,7 @@ class shared_info
mtinfo mt;
loadavginfo loadavg;
LONG pid_src;
char forkable_hardlink_support; /* single byte access always is atomic */
LONG forkable_hardlink_support;
void initialize ();
void init_obcaseinsensitive ();