Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-03-17 00:20:29 +0400
committerChristopher Faylor <me@cgf.cx>2012-03-17 00:20:29 +0400
commit4aeaedf961029e38cd9c97ac1e32ba91406c9e23 (patch)
tree88371461329ddcd2c9eac8659dd5d2763da82330 /winsup/cygwin/sync.h
parentd3f6480e44081964526de50792c6d28ca2d24580 (diff)
* fork.cc (lock_signals): Move to sigproc.h.
(lock_pthread): Ditto. (hold_everything): Ditto. (frok::parent): Call myself.prefork() just before calling CreateProcess. Call myself.postfork () on function exit. * pinfo.cc (pinfo::pending_rd_proc_pipe): Define. (pinfo::pending_wr_proc_pipe): Ditto. (_pinfo::dup_proc_pipe): Delete. (pinfo::wait): Move pipe creation into pinfo::prefork. Set pipe variables from pending_*. (_pinfo::sync_proc_pipe): Delete. (_pinfo::proc_pipe_owner): Ditto. (pinfo::prefork): Define new function. (pinfo::postfork): Ditto. (pinfo::postexec): Ditto. (_pinfo::alert_parent): Remove obsolete call to sync_proc_pipe. (_pinfo::dup_proc_pipe): Delete declaration. (_pinfo::sync_proc_pipe): Ditto. (pinfo::pending_rd_proc_pipe): Declare. (pinfo::pending_wr_proc_pipe): Ditto. (pinfo::prefork): Declare new function. (pinfo::postfork): Ditto. (pinfo::postexec): Ditto. (pinfo::wr_proc_pipe): Define new wrapper function. * sigproc.h: Include "sync.h". Move locking functions from fork to here. * spawn.cc (child_info_spawn::worker): Delete now-unneeded requirement to record orig_wr_proc_pipe. Call hold_everything prior to doing anything. Call myself.prefork() if spawning. Replace wr_proc_pipe synchronization with call to myself.postexec(). Call myself.postfork() if not execing. * sync.h: Replace #ifdef wrapper with "#pragma once".
Diffstat (limited to 'winsup/cygwin/sync.h')
-rw-r--r--winsup/cygwin/sync.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h
index 2215599c8..c9c5fb595 100644
--- a/winsup/cygwin/sync.h
+++ b/winsup/cygwin/sync.h
@@ -1,6 +1,7 @@
/* sync.h: Header file for cygwin synchronization primitives.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011, 2012
+ Red Hat, Inc.
This file is part of Cygwin.
@@ -8,8 +9,8 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _SYNC_H
-#define _SYNC_H
+#pragma once
+
/* FIXME: Note that currently this class cannot be allocated via `new' since
there are issues with malloc and fork. */
class muto
@@ -62,5 +63,3 @@ public:
friend class dtable;
friend class fhandler_fifo;
};
-
-#endif /*_SYNC_H*/