_log/_vlog were always called so we always had a function call hit even
if we're not debugging. Expand on the debugging macros so the decision
to call _log/_vlog is done in the caller already. Also, make a log level
difference between syscall_printf and system_printf.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The current implementation is a very simple approach to implement
a statically sized sleep queue. The problem is that this code requires
a certain amount of synchronization because the slots in the queue are
used dynamically. To top it off, the Event objects used for sync'ing
are created and destroyed on demand. This is complicated, slow, and
error prone.
There's also a blatant bug here: The number of slots in the queue was
wrongly computed in size. It was too small if XSI IPC was used a lot.
Make the code more robust. Let the queue have the right size. Every
slot is now used for a specific IPC object. All sync objects (switched
to Semaphores) are only created when first required, but never destroyed.
This reduces the usage of a critical section to the creation of a new
sync object.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The number of threads in the worker pool is fixed so far. This is a
problem in XSI IPC scenarions with an unknown number of consumers.
It doesn't make sense to make the pool very big for a start, but when
the need arises, we need to make sure we can serve the request even if
all other worker threads are in a wait state.
This patch changes threaded_queue to just add another worker thread
if all current workers are busy.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.
Everything else stays under GPLv3+.
New Linking Exception exempts resulting executables from LGPLv3 section 4.
Add CONTRIBUTORS file to keep track of licensing.
Remove 'Copyright Red Hat Inc' comments.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Rename without-mingw-progs to with-cross-bootstrap, since it now
disables additional checks that are problematic for cross-compilers.
When cross-compiling a toolchain targeting cygwin, building cygwin1.dll
requires libgcc.
However, building libgcc requires the cygwin headers to be
installed.
Configuring cygwin requries the mingw-crt libraries, which require the
cygwin headers to be installed.
Work around this circular dependency by making the
--with-cross-bootstrap configure option skip cygwin's configure checks
for valid mingw-crt libraries. Cygwin will still properly link against
these libraries if they exist, but this allows configure to succeed even
if the libraries have not been built yet.
Since the mingw-crt libraries only require the cygwin headers to be
installed, this allows us to successfully configure cygwin so that we
can only install the headers without trying to build any
libraries.
winsup/ChangeLog
configure.ac: rename without-mingw-progs option to with-cross-bootstrap
configure: regenerate
winsup/cygserver/ChangeLog
configure.ac: don't check AC_WINDOWS_LIBS when using with-cross-bootstrap
configure: regenerate
winsup/cygwin/ChangeLog
configure.ac: don't check AC_WINDOWS_LIBS when using with-cross-bootstrap
configure: regenerate
Signed-off-by: Peter Foley <pefoley2@pefoley.com>
* bsd_mutex.cc (_msleep): Fetch signal_arrived handle from thread's
ipcblk.
* process.h (class process): Drop _signal_arrived and align methods.
(process_cache::process): Drop signal_arrived parameter.
* process.cc (process::process): Ditto. Drop related code.
(process::~process): Drop closing signal_arrived handle.
(process_cache::process): Drop signal_arrived parameter in call to
process::process.
(thread::dup_signal_arrived): New method duplicating thread's
signal_arrived handle.
(thread::close_signal_arrived): New method closing thread's
signal_arrived handle.
* msg.cc (client_request_msg::serve): Drop signal_arrived parameter from
call to process_cache::process. Use thread constructor to initialize td.
* sem.cc (client_request_sem::serve): Ditto.
* shm.cc (client_request_shm::serve): Ditto.
Coverity happy (CID 59993).
* transport_pipes.cc (transport_layer_pipes::listen): Make listen_pipe
and connect_pipe statics to make Coverity happy (CID 60010/60011).
2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
* configure.ac: Detect windows headers/libs after we've figured out the
C compiler.
* configure: Regenerate.
* aclocal.m4: Regenerate.
* configure.cygwin: Default to '.' if can't find a winsup directory.
winsup/cygserver/ChangeLog:
2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
* configure.ac: Detect windows headers/libs after we've figured out the
C compiler.
* configure: Regenerate.
* aclocal.m4: Regenerate.
winsup/cygwin/ChangeLog:
2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
* configure.ac: Detect windows headers/libs after we've figured out the
C compiler.
* configure: Regenerate.
* aclocal.m4: Regenerate.
winsup/utils/ChangeLog:
2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
* configure.ac: Detect windows headers/libs after we've figured out the
C compiler.
* configure: Regenerate.
* aclocal.m4: Regenerate.
transport.
* transport_pipes.cc (transport_layer_pipes::listen): Create
first instance of the named pipe here. Connect the client side
to block it for further use by the system.
(transport_layer_pipes::accept): Don't handle first pipe instance
here. Change debug output accordingly.
2012-11-23 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.in: Use explicit path to mkdir.
lsaauth/ChangeLog:
2012-11-23 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.in: Use /bin/mkdir to make directories.
testsuite/ChangeLog:
2012-11-23 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.in: Remove old Makefile.common'isms. Don't rely on
in-build tools.
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.common: Revamp for new configury. Add default compilation
targets, include .E processing. Add magic for allowing "CFLAGS" to
control optimization options in "CXXFLAGS".
* configure.cygwin: New include for Cygwin configure.in's.
* acinclude.m4: Delete old definitions. Implement AC_WINDOWS_HEADERS,
AC_WINDOWS_LIBS, AC_CYGWIN_INCLUDES, target_builddir, winsup_srcdir.
* aclocal.m4: Regenerate.
* autogen.sh: New file.
* ccwrap: New script.
* c++wrap: New script.
* config.guess: New script.
* config.sub: New script.
* configure: Regenerate.
* configure.in: Eliminate LIB_AC_PROG_* calls in favor of standard.
Delete ancient target test.
* install-sh: New script.
cygserver/ChangeLog:
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.in: Revamp for new configury.
* configure.in: Revamp for new configury.
* aclocal.m4: Regenerate.
* configure: Ditto.
* autogen.sh: New script.
cygwin/ChangeLog:
2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx>
* select.cc (select): Don't return -1 when we've timed out after
looping.
2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx>
* Makefile.in: Revamp for new configury.
(datarootdir): Add variable setting.
(winver_stamp): Accommodate changes to mkvers.sh setting.
(libc.a): Fix race when libm.a might not have been built yet.
* configure.in: Revamp for new configury.
* aclocal.m4: Regenerate.
* configure: Ditto.
* autogen.sh: New script.
* mkvers.sh: Find include directives via CFLAGS and friends rather than
assuming that w32api lives nearby.
utils/ChangeLog:
2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx>
* aclocal.m4: Regenerate.
* configure: Ditto.
* autogen.sh: New script.
* configure.in: Revamp for new configury.
* Makefile.in: Revamp for new configury. Rename ALL_* to just *.
Always use "VERBOSE" setting.
(MINGW_CXX): Don't include CFLAGS in definition.
(all): Define target first, before everything else so that it is the
default.
(ps.exe): Don't add useless -lcygwin.
(ldh.exe): For consistency, add to existing MINGW_LDFLAGS rather than
redefining them.
(cygcheck.exe): Always include -lz for MINGW_LDFLAGS. Don't try to
figure out where to find it.
(dumper.exe): Simplify check. Assume libraries are installed rather
than trying to retrieve from source tree.
(install): Just use /bin/mkdir to create directories.
(Makefile): Regenerate when standard dependencies change.
* dump_setup.cc: Always include zlib.h. Remove accommodations for it
possibly not existing.
* parse_pe.cc: Add define which allows building with installed
binutils package.
* dumper.cc: Ditto.