fhandler_*::dump functions throughout.
* fhandler.h (fhandler_dev_mem::close): Remove pass-through function in favor
of virtual method.
(handler_dev_raw::close): Ditto.
(fhandler_dev_clipboard::fixup_after_exec): New method.
* fhandler_dev_mem.cc (fhandler_dev_mem::close): Eliminate pass through
* fhandler_dev_raw.cc (fhandler_dev_raw::close): Ditto.
* fhandler_clipboard.cc (fhandler_dev_clipboard::close): Don't go to extra
effort when execing.
(fhandler_dev_clipboard::fixup_after_exec): New function.
* fhandler_console.cc (fhandler_console::close): Don't do "extra stuff" when we
know we're execing.
* fhandler_disk_file.cc (fhandler_disk_file::close): Ditto.
* fhandler_dsp.cc (fhandler_dev_dsp::close): Ditto.
* fhandler_fifo.cc (fhandler_fifo.cc::close): Ditto. function in favor of base
function.
* fhandler_random.cc (fhandler_dev_random::close): Ditto.
* fhandler_registry.cc (fhandler_registry::close): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::close): Ditto.
* fhandler_virtual.cc (fhandler_virtual::close): Ditto.
* pinfo.cc (proc_waiter): Remove unneeded hExeced declaration.
* sigproc.cc: Ditto.
* winsup.h (hExeced): Define here.
* fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Just call close()
to reinitialize things to known state.
2005-07-04 Christopher Faylor <cgf@timesys.com>
+ Change foo (void) to foo () for all c++ functions throughout.
+ Remove all fhandler_*::dump functions throughout.
+
+ * fhandler.h (fhandler_dev_mem::close): Remove pass-through function in
+ favor of virtual method.
+ (handler_dev_raw::close): Ditto.
+ (fhandler_dev_clipboard::fixup_after_exec): New method.
+ * fhandler_dev_mem.cc (fhandler_dev_mem::close): Eliminate pass through
+ * fhandler_dev_raw.cc (fhandler_dev_raw::close): Ditto.
+ * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Don't go to
+ extra effort when execing.
+ (fhandler_dev_clipboard::fixup_after_exec): New function.
+ * fhandler_console.cc (fhandler_console::close): Don't do "extra stuff"
+ when we know we're execing.
+ * fhandler_disk_file.cc (fhandler_disk_file::close): Ditto.
+ * fhandler_dsp.cc (fhandler_dev_dsp::close): Ditto.
+ * fhandler_fifo.cc (fhandler_fifo.cc::close): Ditto.
+ function in favor of base function.
+ * fhandler_random.cc (fhandler_dev_random::close): Ditto.
+ * fhandler_registry.cc (fhandler_registry::close): Ditto.
+ * fhandler_tty.cc (fhandler_tty_slave::close): Ditto.
+ * fhandler_virtual.cc (fhandler_virtual::close): Ditto.
+
+ * pinfo.cc (proc_waiter): Remove unneeded hExeced declaration.
+ * sigproc.cc: Ditto.
+ * winsup.h (hExeced): Define here.
+
+ * fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Just call
+ close() to reinitialize things to known state.
+
+2005-07-04 Christopher Faylor <cgf@timesys.com>
+
* cygtls.h (_cygtls): Perform minor reformatting.
* winsup.h (close_all_files): Reflect argument change.
client_request_msg (int, const void *, size_t, int); // msgsnd
#endif
- int retval (void) const { return _parameters.out.ret; }
- ssize_t rcvval (void) const { return _parameters.out.rcv; }
+ int retval () const { return _parameters.out.ret; }
+ ssize_t rcvval () const { return _parameters.out.rcv; }
};
#ifndef __INSIDE_CYGWIN__
-int msginit (void);
-int msgunload (void);
+int msginit ();
+int msgunload ();
int msgctl (struct thread *, struct msgctl_args *);
int msgget (struct thread *, struct msgget_args *);
int msgsnd (struct thread *, struct msgsnd_args *);
client_request_sem (int, struct sembuf *, size_t); // semop
#endif
- int retval (void) const { return _parameters.out.ret; }
+ int retval () const { return _parameters.out.ret; }
};
#ifndef __INSIDE_CYGWIN__
-int seminit (void);
-int semunload (void);
+int seminit ();
+int semunload ();
void semexit_myhook(void *arg, struct proc *p);
int semctl (struct thread *, struct semctl_args *);
client_request_shm (proc *); // shmfork
#endif
- int retval (void) const { return _parameters.out.ret; }
- void *ptrval (void) const { return (void *)_parameters.out.ptr; }
- vm_object_t objval (void) const { return _parameters.out.obj; }
+ int retval () const { return _parameters.out.ret; }
+ void *ptrval () const { return (void *)_parameters.out.ptr; }
+ vm_object_t objval () const { return _parameters.out.obj; }
};
#ifndef __INSIDE_CYGWIN__
-void shminit (void);
-int shmunload (void);
+void shminit ();
+int shmunload ();
void shmexit_myhook (struct vmspace *vm);
int cygwin_shmfork_myhook (struct thread *, struct proc *);
fhandler_base *build_fh_name (const char *unix_name, HANDLE = NULL, unsigned = 0, suffix_info * = NULL);
fhandler_base *build_fh_pc (path_conv& pc);
-void dtable_init (void);
-void stdio_init (void);
+void dtable_init ();
+void stdio_init ();
extern dtable fdtab;
extern "C" int getfdtabsize ();
extern DWORD sigtid;
-extern HANDLE hExeced;
extern DWORD dwExeced;
static BOOL WINAPI ctrl_c_handler (DWORD);
HANDLE NO_COPY tty_mutex = NULL;
void
-events_init (void)
+events_init ()
{
char *name;
char mutex_name[CYG_MAX_PATH];
}
void
-events_terminate (void)
+events_terminate ()
{
exit_already = 1;
}
debug_printf ("created new fhandler_base for handle %p, bin %d", f, rbinary ());
}
-void
-fhandler_base::dump (void)
-{
- paranoid_printf ("here");
-}
-
int
fhandler_base::dup (fhandler_base *child)
{
}
int
-fhandler_base::tcdrain (void)
+fhandler_base::tcdrain ()
{
set_errno (ENOTTY);
return -1;
}
int
-fhandler_base::tcgetpgrp (void)
+fhandler_base::tcgetpgrp ()
{
set_errno (ENOTTY);
return -1;
}
/* Normal I/O destructor */
-fhandler_base::~fhandler_base (void)
+fhandler_base::~fhandler_base ()
{
if (rabuf)
free (rabuf);
{
}
-void
-fhandler_dev_null::dump (void)
-{
- paranoid_printf ("here");
-}
-
int
fhandler_dev_null::open (int flags, mode_t mode)
{
virtual int __stdcall ftruncate (_off64_t) __attribute__ ((regparm (2)));
virtual int __stdcall link (const char *) __attribute__ ((regparm (2)));
virtual int __stdcall utimes (const struct timeval *) __attribute__ ((regparm (2)));
- virtual int __stdcall fsync (void) __attribute__ ((regparm (1)));
+ virtual int __stdcall fsync () __attribute__ ((regparm (1)));
virtual int ioctl (unsigned int cmd, void *);
virtual int fcntl (int cmd, void *);
virtual char const *ttyname () { return get_name (); }
virtual ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
virtual _off64_t lseek (_off64_t offset, int whence);
virtual int lock (int, struct __flock64 *);
- virtual void dump ();
virtual int dup (fhandler_base *child);
virtual HANDLE mmap (caddr_t *addr, size_t len, DWORD access,
void af_local_set_secret (char *);
void af_local_setblocking (bool &, bool &);
void af_local_unsetblocking (bool, bool);
- void af_local_set_cred (void);
+ void af_local_set_cred ();
void af_local_copy (fhandler_socket *);
- bool af_local_recv_secret (void);
- bool af_local_send_secret (void);
- bool af_local_recv_cred (void);
- bool af_local_send_cred (void);
- int af_local_accept (void);
+ bool af_local_recv_secret ();
+ bool af_local_send_secret ();
+ bool af_local_recv_cred ();
+ bool af_local_send_cred ();
+ int af_local_accept ();
public:
- int af_local_connect (void);
- void af_local_set_sockpair_cred (void);
+ int af_local_connect ();
+ void af_local_set_sockpair_cred ();
private:
struct _WSAPROTOCOL_INFOA *prot_info_ptr;
fhandler_dev_raw ();
public:
- ~fhandler_dev_raw (void);
+ ~fhandler_dev_raw ();
int open (int flags, mode_t mode = 0);
- int close (void);
-
void raw_read (void *ptr, size_t& ulen);
int raw_write (const void *ptr, size_t ulen);
bool is_rewind_device () { return get_minor () < 128; }
unsigned int driveno () { return (unsigned int) get_minor () & 0x7f; }
- void drive_init (void);
+ void drive_init ();
inline bool _lock ();
inline int unlock (int ret = 0);
fhandler_dev_tape ();
virtual int open (int flags, mode_t mode = 0);
- virtual int close (void);
+ virtual int close ();
void raw_read (void *ptr, size_t& ulen);
int raw_write (const void *ptr, size_t ulen);
class fhandler_disk_file: public fhandler_base
{
- void touch_ctime (void);
+ void touch_ctime ();
public:
fhandler_disk_file ();
int tcgetattr (struct termios *t);
_off64_t lseek (_off64_t, int) { return 0; }
int tcflush (int);
- void dump ();
int is_tty () { return 1; }
void fixup_after_fork (HANDLE parent);
void fixup_after_exec ();
fhandler_dev_null ();
int open (int, mode_t);
- void dump ();
select_record *select_read (select_record *s);
select_record *select_write (select_record *s);
select_record *select_except (select_record *s);
int write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
_off64_t lseek (_off64_t offset, int whence);
-
- void dump ();
};
class fhandler_dev_random: public fhandler_base
int write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
_off64_t lseek (_off64_t offset, int whence);
- int close (void);
+ int close ();
int dup (fhandler_base *child);
-
- void dump ();
};
class fhandler_dev_mem: public fhandler_base
public:
fhandler_dev_mem ();
- ~fhandler_dev_mem (void);
+ ~fhandler_dev_mem ();
int open (int flags, mode_t mode = 0);
int write (const void *ptr, size_t ulen);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
_off64_t lseek (_off64_t offset, int whence);
- int close (void);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int dup (fhandler_base *child);
int msync (HANDLE h, caddr_t addr, size_t len, int flags);
bool fixup_mmap_after_fork (HANDLE h, DWORD access, int flags,
_off64_t offset, DWORD size, void *address);
-
- void dump ();
} ;
class fhandler_dev_clipboard: public fhandler_base
{
+ _off64_t pos;
+ void *membuffer;
+ size_t msize;
+ bool eof;
public:
fhandler_dev_clipboard ();
- int is_windows (void) { return 1; }
+ int is_windows () { return 1; }
int open (int flags, mode_t mode = 0);
int write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
_off64_t lseek (_off64_t offset, int whence);
- int close (void);
+ int close ();
int dup (fhandler_base *child);
-
- void dump ();
-
- private:
- _off64_t pos;
- void *membuffer;
- size_t msize;
- bool eof;
+ void fixup_after_exec ();
};
class fhandler_windows: public fhandler_base
int method_; // write method (Post or Send)
public:
fhandler_windows ();
- int is_windows (void) { return 1; }
+ int is_windows () { return 1; }
int open (int flags, mode_t mode = 0);
int write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
int ioctl (unsigned int cmd, void *);
_off64_t lseek (_off64_t, int) { return 0; }
- int close (void) { return 0; }
+ int close () { return 0; }
void set_close_on_exec (bool val);
void fixup_after_fork (HANDLE parent);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
int ioctl (unsigned int cmd, void *);
_off64_t lseek (_off64_t, int);
- int close (void);
+ int close ();
int dup (fhandler_base *child);
- void dump (void);
void fixup_after_fork (HANDLE parent);
void fixup_after_exec ();
private:
_off64_t lseek (_off64_t, int);
int dup (fhandler_base *child);
int open (int flags, mode_t mode = 0);
- int close (void);
+ int close ();
int __stdcall fstat (struct stat *buf) __attribute__ ((regparm (2)));
int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
bool fill_filebuf ();
- int close (void);
+ int close ();
};
class pinfo;
}
int
-fhandler_dev_clipboard::close (void)
+fhandler_dev_clipboard::close ()
{
- eof = true;
- pos = 0;
- if (membuffer)
- free (membuffer);
- msize = 0;
+ if (!hExeced)
+ {
+ eof = true;
+ pos = 0;
+ if (membuffer)
+ free (membuffer);
+ msize = 0;
+ }
return 0;
}
void
-fhandler_dev_clipboard::dump ()
+fhandler_dev_clipboard::fixup_after_exec ()
{
- paranoid_printf ("here, fhandler_dev_clipboard");
+ (void) close ();
}
}
int
-fhandler_console::close (void)
+fhandler_console::close ()
{
CloseHandle (get_io_handle ());
CloseHandle (get_output_handle ());
- set_io_handle (NULL);
- set_output_handle (NULL);
- if (--(cygheap->open_fhs) <= 0 && myself->ctty != TTY_CONSOLE)
+ if (!hExeced && --(cygheap->open_fhs) <= 0 && myself->ctty != TTY_CONSOLE)
{
syscall_printf ("open_fhs %d", cygheap->open_fhs);
FreeConsole ();
}
int
-fhandler_console::igncr_enabled (void)
+fhandler_console::igncr_enabled ()
{
return tc->ti.c_iflag & IGNCR;
}
}
void
-fhandler_disk_file::touch_ctime (void)
+fhandler_disk_file::touch_ctime ()
{
FILETIME ft;
int
fhandler_disk_file::close ()
{
- /* Changing inode data requires setting ctime (only 9x). */
- if (has_changed ())
- touch_ctime ();
+ if (!hExeced)
+ {
+ /* Changing inode data requires setting ctime (only 9x). */
+ if (has_changed ())
+ touch_ctime ();
+ }
return close_fs ();
}
}
int
-fhandler_dev_dsp::close (void)
+fhandler_dev_dsp::close ()
{
debug_printf ("audio_in=%08x audio_out=%08x",
(int)audio_in_, (int)audio_out_);
- if ((fhandler_dev_dsp *) archetype != this)
- return ((fhandler_dev_dsp *)archetype)->close ();
-
- if (--usecount == 0)
+ if (!hExeced)
{
- close_audio_in ();
- close_audio_out (exit_state != ES_NOT_EXITING);
+ if ((fhandler_dev_dsp *) archetype != this)
+ return ((fhandler_dev_dsp *) archetype)->close ();
+
+ if (--usecount == 0)
+ {
+ close_audio_in ();
+ close_audio_out (exit_state != ES_NOT_EXITING);
+ }
}
return 0;
}
}
void
-fhandler_dev_dsp::dump ()
-{
- paranoid_printf ("here");
-}
-
-void
fhandler_dev_dsp::fixup_after_fork (HANDLE parent)
{ // called from new child process
debug_printf ("audio_in=%08x audio_out=%08x",
fhandler_pipe::close ();
if (get_output_handle ())
CloseHandle (get_output_handle ());
- set_use (-1);
+ if (!hExeced)
+ set_use (-1);
return 0;
}
{
}
-fhandler_dev_mem::~fhandler_dev_mem (void)
+fhandler_dev_mem::~fhandler_dev_mem ()
{
}
return;
}
-int
-fhandler_dev_mem::close (void)
-{
- return fhandler_base::close ();
-}
-
_off64_t
fhandler_dev_mem::lseek (_off64_t offset, int whence)
{
}
return ret;
}
-
-void
-fhandler_dev_mem::dump ()
-{
- paranoid_printf ("here, fhandler_dev_mem");
-}
}
int
-fhandler_dev_random::close (void)
+fhandler_dev_random::close ()
{
- if (crypt_prov)
+ if (!hExeced && crypt_prov)
while (!CryptReleaseContext (crypt_prov, 0)
&& GetLastError () == ERROR_BUSY)
Sleep (10);
fhr->crypt_prov = (HCRYPTPROV)NULL;
return 0;
}
-
-void
-fhandler_dev_random::dump ()
-{
- paranoid_printf ("here, fhandler_dev_random");
-}
need_fork_fixup (true);
}
-fhandler_dev_raw::~fhandler_dev_raw (void)
+fhandler_dev_raw::~fhandler_dev_raw ()
{
if (devbufsiz > 1L)
delete [] devbuf;
return res;
}
-int
-fhandler_dev_raw::close (void)
-{
- return fhandler_base::close ();
-}
-
void
fhandler_dev_raw::raw_read (void *ptr, size_t& ulen)
{
res = -1;
}
}
- if (value_name)
+ if (!hExeced && value_name)
cfree (value_name);
return res;
}
}
void
-fhandler_serial::dump (void)
-{
- paranoid_printf ("here");
-}
-
-void
fhandler_serial::init (HANDLE f, DWORD flags, mode_t bin)
{
(void) open (flags, bin & (O_BINARY | O_TEXT));
/* tcdrain: POSIX 7.2.2.1 */
int
-fhandler_serial::tcdrain (void)
+fhandler_serial::tcdrain ()
{
if (FlushFileBuffers (get_handle ()) == 0)
return -1;
}
void
-fhandler_socket::af_local_set_sockpair_cred (void)
+fhandler_socket::af_local_set_sockpair_cred ()
{
sec_pid = sec_peer_pid = getpid ();
sec_uid = sec_peer_uid = geteuid32 ();
}
bool
-fhandler_socket::af_local_recv_secret (void)
+fhandler_socket::af_local_recv_secret ()
{
int out[4] = { 0, 0, 0, 0 };
int rest = sizeof out;
}
bool
-fhandler_socket::af_local_send_secret (void)
+fhandler_socket::af_local_send_secret ()
{
int rest = sizeof connect_secret;
char *ptr = (char *) connect_secret;
}
bool
-fhandler_socket::af_local_recv_cred (void)
+fhandler_socket::af_local_recv_cred ()
{
struct ucred out = { (pid_t) 0, (__uid32_t) -1, (__gid32_t) -1 };
int rest = sizeof out;
}
bool
-fhandler_socket::af_local_send_cred (void)
+fhandler_socket::af_local_send_cred ()
{
struct ucred in = { sec_pid, sec_uid, sec_gid };
int rest = sizeof in;
}
int
-fhandler_socket::af_local_connect (void)
+fhandler_socket::af_local_connect ()
{
/* This keeps the test out of select. */
if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM)
}
int
-fhandler_socket::af_local_accept (void)
+fhandler_socket::af_local_accept ()
{
debug_printf ("af_local_accept called");
bool orig_async_io, orig_is_nonblocking;
}
void
-fhandler_socket::af_local_set_cred (void)
+fhandler_socket::af_local_set_cred ()
{
sec_pid = getpid ();
sec_uid = geteuid32 ();
/* mtinfo */
void
-mtinfo::initialize (void)
+mtinfo::initialize ()
{
char name[CYG_MAX_PATH];
HANDLE mtx;
}
int
-fhandler_dev_tape::close (void)
+fhandler_dev_tape::close ()
{
int ret, cret;
int
fhandler_tty_slave::close ()
{
- if (!--cygheap->open_fhs && myself->ctty == -1)
- FreeConsole ();
+ if (!hExeced)
+ {
+ if (!--cygheap->open_fhs && myself->ctty == -1)
+ FreeConsole ();
- archetype->usecount--;
- report_tty_counts (this, "closed", "decremented ", "");
+ archetype->usecount--;
+ report_tty_counts (this, "closed", "decremented ", "");
- if (archetype->usecount)
- {
+ if (archetype->usecount)
+ {
#ifdef DEBUGGING
- if (archetype->usecount < 0)
- system_printf ("error: usecount %d", archetype->usecount);
+ if (archetype->usecount < 0)
+ system_printf ("error: usecount %d", archetype->usecount);
#endif
- termios_printf ("just returning because archetype usecount is != 0");
- return 0;
+ termios_printf ("just returning because archetype usecount is != 0");
+ return 0;
+ }
}
termios_printf ("closing last open %s handle", ttyname ());
if (!ForceCloseHandle1 (get_output_handle (), to_pty))
termios_printf ("CloseHandle (get_output_handle ()<%p>), %E", get_output_handle ());
- inuse = NULL;
- set_io_handle (NULL);
+ if (!hExeced)
+ {
+ inuse = NULL;
+ set_io_handle (NULL);
+ }
return 0;
}
CloseHandle (get_ttyp ()->from_master);
if (get_ttyp ()->to_master)
CloseHandle (get_ttyp ()->to_master);
- get_ttyp ()->init ();
+ if (!hExeced)
+ get_ttyp ()->init ();
}
return 0;
void
fhandler_virtual::fixup_after_exec ()
{
- if (filebuf)
- filebuf = NULL;
+ close ();
}
DIR *
int
fhandler_virtual::close ()
{
- if (filebuf)
- free (filebuf);
- filebuf = NULL;
- bufalloc = (size_t) -1;
- user_shared->delqueue.process_queue ();
+ if (!hExeced)
+ {
+ if (filebuf)
+ free (filebuf);
+ filebuf = NULL;
+ bufalloc = (size_t) -1;
+ }
return 0;
}
{
return 0;
}
-
-void
-fhandler_dev_zero::dump ()
-{
- paranoid_printf ("here, fhandler_dev_zero");
-}
bool alloc_page_map (_off64_t off, DWORD len);
void free_page_map () { if (page_map_) cfree (page_map_); }
- void fixup_page_map (void);
+ void fixup_page_map ();
DWORD find_unused_pages (DWORD pages);
_off64_t map_pages (_off64_t off, DWORD len);
IMPLEMENT_STATUS_FLAG (bool, sysv)
IMPLEMENT_STATUS_FLAG (bool, nowait)
- PTAPE_GET_DRIVE_PARAMETERS dp (void) { return &_dp; }
- PTAPE_GET_MEDIA_PARAMETERS mp (void) { return &_mp; }
+ PTAPE_GET_DRIVE_PARAMETERS dp () { return &_dp; }
+ PTAPE_GET_MEDIA_PARAMETERS mp () { return &_mp; }
mtinfo_part *part (int num) { return &_part[num]; }
};
mtinfo_drive _drive[MAX_DRIVE_NUM];
public:
- void initialize (void);
+ void initialize ();
mtinfo_drive *drive (int num) { return &_drive[num]; }
};
{
DWORD nb;
char buf = '\0';
- extern HANDLE hExeced;
if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL)
&& GetLastError () != ERROR_BROKEN_PIPE)
}
void
-pthread_testcancel (void)
+pthread_testcancel ()
{
pthread::self ()->testcancel ();
}
/* yield the cpu */
int
-sched_yield (void)
+sched_yield ()
{
low_priority_sleep (0);
return 0;
}
void
-security_descriptor::free (void)
+security_descriptor::free ()
{
if (psd)
::free (psd);
PSECURITY_DESCRIPTOR malloc (size_t nsize);
PSECURITY_DESCRIPTOR realloc (size_t nsize);
- void free (void);
+ void free ();
- inline DWORD size (void) const { return sd_size; }
+ inline DWORD size () const { return sd_size; }
inline operator const PSECURITY_DESCRIPTOR () { return psd; }
};
/* shared.cc: */
/* Retrieve a security descriptor that allows all access */
-SECURITY_DESCRIPTOR *__stdcall get_null_sd (void);
+SECURITY_DESCRIPTOR *__stdcall get_null_sd ();
/* Various types of security attributes for use in Create* functions. */
extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
static bool __stdcall stopped_or_terminated (waitq *, _pinfo *);
static DWORD WINAPI wait_sig (VOID *arg);
-extern HANDLE hExeced;
-
/* wait_sig bookkeeping */
class pending_signals
}
void
-MTinterface::fixup_before_fork (void)
+MTinterface::fixup_before_fork ()
{
pthread_key::fixup_before_fork ();
}
/* This function is called from a single threaded process */
void
-MTinterface::fixup_after_fork (void)
+MTinterface::fixup_after_fork ()
{
pthread_key::fixup_after_fork ();
}
int
-pthread::cancel (void)
+pthread::cancel ()
{
class pthread *thread = this;
class pthread *self = pthread::self ();
}
void
-pthread::testcancel (void)
+pthread::testcancel ()
{
if (cancelstate == PTHREAD_CANCEL_DISABLE)
return;
}
void
-pthread::static_cancel_self (void)
+pthread::static_cancel_self ()
{
pthread::self ()->cancel_self ();
}
}
void
-pthread::atforkprepare (void)
+pthread::atforkprepare ()
{
callback *cb = MT_INTERFACE->pthread_prepare;
while (cb)
}
void
-pthread::atforkparent (void)
+pthread::atforkparent ()
{
__fp_unlock_all ();
}
void
-pthread::atforkchild (void)
+pthread::atforkchild ()
{
MT_INTERFACE->fixup_after_fork ();
See http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_getconcurrency.html
*/
extern "C" int
-pthread_getconcurrency (void)
+pthread_getconcurrency ()
{
return MT_INTERFACE->concurrency;
}
void _fixup_after_fork ();
- void pop_all_cleanup_handlers (void);
+ void pop_all_cleanup_handlers ();
void precreate (pthread_attr *);
void postcreate ();
bool create_cancel_event ();
callback *pthread_parent;
void Init ();
- void fixup_before_fork (void);
- void fixup_after_fork (void);
+ void fixup_before_fork ();
+ void fixup_after_fork ();
#if 0 // avoid initialization since zero is implied and
MTinterface () :
}
void __stdcall
-tty_init (void)
+tty_init ()
{
if (!myself->cygstarted && NOTSTATE (myself, PID_CYGPARENT))
cygheap->fdtab.get_debugger_info ();
}
void __stdcall
-tty_terminate (void)
+tty_terminate ()
{
if (NOTSTATE (myself, PID_USETTY))
return;
}
void
-tty_list::terminate (void)
+tty_list::terminate ()
{
int ttynum = myself->ctty;
}
void
-tty_list::init (void)
+tty_list::init ()
{
for (int i = 0; i < NTTYS; i++)
{
}
void
-tty::init (void)
+tty::init ()
{
output_stopped = 0;
setsid (0);
void __stdcall do_exit (int) __attribute__ ((regparm (1), noreturn));
/* UID/GID */
-void uinfo_init (void);
+void uinfo_init ();
#define ILLEGAL_UID16 ((__uid16_t)-1)
#define ILLEGAL_UID ((__uid32_t)-1)
#define get_ll(pl) (((long long) (pl).HighPart << 32) | (pl).LowPart)
/* various events */
-void events_init (void);
-void events_terminate (void);
+void events_init ();
+void events_terminate ();
void __stdcall close_all_files (bool = false);
extern "C" int low_priority_sleep (DWORD) __attribute__ ((regparm (1)));
#define SLEEP_0_STAY_LOW INFINITE
-size_t getshmlba (void);
+size_t getshmlba ();
int winprio_to_nice (DWORD) __attribute__ ((regparm (1)));
DWORD nice_to_winprio (int &) __attribute__ ((regparm (1)));
extern HANDLE hMainProc;
extern HANDLE hProcToken;
extern HANDLE hProcImpToken;
+extern HANDLE hExeced;
extern bool cygwin_testing;