summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
...
* cygwin: wincap: fix evaluation of build numberCorinna Vinschen2017-04-241-0/+1
| | | | | | | | | RtlGetNtVersionNumbers returns the build number with some upper bits set for no apparent reason. The fact that RtlGetNtVersionNumbers is undocumented doesn't exactly help. Just filter out the upper WORD for now. If build numbers are in danger to become 6 digit numbers, re-evaluate.
* cygwin: remov unused winpids constructorCorinna Vinschen2017-04-241-2/+0
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix stat.st_blocks for files compressed with CompactOS methodChristian Franke2017-04-221-5/+12
| | | | | | | | Always retrieve FileCompressionInformation for non-empty files if FileStandardInformation returns 0 allocated blocks. This fixes stat.st_blocks for files compressed with CompactOS method. Signed-off-by: Christian Franke <franke@computer.org>
* cygwin doc: Add postinstall/preremove scripts to install Start Menu entriesBrian Inglis2017-04-223-2/+115
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin CONTRIBUTORS: Add Brian InglisCorinna Vinschen2017-04-221-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin doc: install-html: Fix docbook.css and index.html symlink installationCorinna Vinschen2017-04-221-4/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Update URLs for Cygwin packaging informationnewlib-snapshot-20170421Jon Turney2017-04-203-13/+6
| | | | | | | | Also: Remove obsolete reference to g-b-s Remove mention of ancient pre-invisiconsole behaviour of setup scripts Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* strace: Fix "over-optimization" flaw in strace.Daniel Santos2017-04-191-1/+1
| | | | | | | | Recent versions of gcc are optimizing away the TLS buffer allocated in main, so we need to tell gcc that it's really used. RtlSecureZeroMemory accomplishes this while also inlining the memset. Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
* cygwin doc: install-html: install docbook.cssCorinna Vinschen2017-04-192-0/+25
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin doc: install-html: link index.html instead of copyingCorinna Vinschen2017-04-191-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* newlib: remove __infinity{f,ld} constantsCorinna Vinschen2017-04-181-0/+5
| | | | | | | | | | | | | | | previous commit 4c90db7bc89e7fa1077025fefdd58269dc71a6ac introduced a compile time error because libm/common/s_infconst.c used the remove __fmath, __dmath, and __ldmath union types. Since this is very old, and unused for a very long time, just drop the file and thus the __infinity constants entirely. Exception: Cygwin exports __infinity from the beginning. There's a very, VERY low probability that any existing executable or lib still uses this constant, but we just keep it in for backward compat, nevertheless. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Avoid decimal point localization in /proc/loadavgJon Turney2017-04-101-3/+8
| | | | | | | | Explicitly format the contents of /proc/loadavg to avoid the decimal point getting localized according to LC_NUMERIC. Using anything other than '.' is wrong and breaks top. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* mkvers.sh: Remove "function" to avoid dash objecting to bash-ism.Mark Geisert2017-04-061-1/+1
|
* Make ldd stop after any non-continuable exceptionJon Turney2017-04-041-1/+9
| | | | | | | | | | Ensure that ldd always stops when the exception is flagged as non-continuable. Also arrange for ldd to exit with a non-zero exit code if something went wrong which prevented us from listing all dynamic dependencies. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Cygwin: Export reallocarrayCorinna Vinschen2017-04-043-1/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Bump Cygwin to 2.8.1Corinna Vinschen2017-04-041-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add latest changes to Cygwin release informationCorinna Vinschen2017-03-282-2/+18
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Change CURR_SHARED_MAGIC to account for getloadavg patchCorinna Vinschen2017-03-281-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement getloadavg()Jon Turney2017-03-2711-4/+240
| | | | | | | | | | | | | | | v2: autoload PerfDataHelper functions Keep loadavg in shared memory Guard loadavg access by a mutex Initialize loadavg to the current load v3: Shared memory version bump isn't needed if we are only extending it Remove unused autoload Mark inititalized flags as NO_COPY for correct behaviour in fork child Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* declaration of ppoll() by poll.h should be guarded by _GNU_SOURCEJon Turney2017-03-271-0/+2
| | | | Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Recognize Netapp mode supporting reparse pointsCorinna Vinschen2017-03-271-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygwin: Do not generate surrogate chars on netappCorinna Vinschen2017-03-241-1/+1
| | | | | | | Just like Samba, Netapp FSes seem to dislike invalid surrogate usage in filenames. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Document cygserver changesCorinna Vinschen2017-03-241-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygserver: Speed up non-debug scenarioCorinna Vinschen2017-03-247-16/+30
| | | | | | | | | _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>
* cygserver: Small code cleanupCorinna Vinschen2017-03-242-3/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygserver: Revamp thread sleep handlingCorinna Vinschen2017-03-245-99/+71
| | | | | | | | | | | | | | | | | | | | 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>
* cygserver: raise number of worker threads on demandCorinna Vinschen2017-03-242-12/+11
| | | | | | | | | | | | | 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>
* cygserver: Only print basename of source in debug output to raise readabilityCorinna Vinschen2017-03-241-1/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygserver: Seralize debug output to stdout to raise readabilityCorinna Vinschen2017-03-241-0/+13
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* dlfcn: Remove stray debug outputnewlib-snapshot-20170323Corinna Vinschen2017-03-222-2/+0
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Rename <sys/_locale.h> to <xlocale.h>Yaakov Selkowitz2017-03-222-1/+6
| | | | | | | | | The locale_t type is provided by <xlocale.h> on Linux, FreeBSD, and Darwin. While, like on some of those systems, it is automatically included by <locale.h> with the proper feature test macros, its presence under this particular name is still presumed in real-world software. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Cygwin: dlfcn: Fix reference countingCorinna Vinschen2017-03-213-34/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original dll_init code was living under the wrong assumption that dll_dllcrt0_1 and in turn dll_list::alloc will be called for each LoadLibrary call. The same wrong assumption was made for cygwin_detach_dll/dll_list::detach called via FreeLibrary. In reality, dll_dllcrt0_1 gets only called once at first LoadLibrary and cygwin_detach_dll once at last FreeLibrary. In effect, reference counting for DLLs was completely broken after fork: parent: l1 = dlopen ("lib1"); // LoadLibrary, LoadCount = 1 l2 = dlopen ("lib1"); // LoadLibrary, LoadCount = 2 fork (); // LoadLibrary in the child, LoadCount = 1! child: dlclose (l1); // FreeLibrary actually frees the lib x = dlsym (l2); // SEGV * Move reference counting to dlopen/dlclose since only those functions have to keep track of loading/unloading DLLs in the application context. * Remove broken accounting code from dll_list::alloc and dll_list::detach. * Fix error handling in dlclose. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add release message for commit 973f766f6Corinna Vinschen2017-03-141-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "Add release message for commit 973f766f6"Corinna Vinschen2017-03-142-6/+12
| | | | | | This reverts commit 125852d77b65fe2155d0d5fa97e53fc9e2b29984. Accidentally commited too much.
* Add release message for commit 973f766f6Corinna Vinschen2017-03-142-12/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Extend 2.8.0 release textCorinna Vinschen2017-03-121-0/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement fhandler_dev_null::write to workaround a problem with NULCorinna Vinschen2017-03-122-0/+11
| | | | | | | | Windows NUL device returns only the lower 32 bit of the number of bytes written. Implement a fake write function to ignore the underlying NUL device. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Return value from write is ssize_t, not intCorinna Vinschen2017-03-121-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* getrandom: it's MIN, not MAXYaakov Selkowitz2017-03-112-1/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Belatedly bump Cygwin DLL version to 2.8.0Corinna Vinschen2017-03-103-2/+35
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop now unused child_info_fork::from_mainCorinna Vinschen2017-03-101-2/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* fork: Don't copy _main_tls->local_clib from *_impure_ptrCorinna Vinschen2017-03-101-7/+2
| | | | | | | | | | | So far we copy *_impure_ptr into _main_tls->local_clib if the child process has been forked from a pthread. But that's not required. The local_clib area of the new thread is on the stack and the stack gets copied from the parent anyway (in frok::parent). So we only have to make sure _main_tls is pointing to the right address and do the simple post-fork thread init. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* _dll_crt0: Drop incorrect check for being started from parent main threadCorinna Vinschen2017-03-101-1/+1
| | | | | | | | | | | This test was broken from the start. It leads to creating a completely new stack for the main thread of the child process when started from the main thread of the parent. However, the main thread of a process can easily running on a completely different stack, if the parent's main thread was created by calling fork() from a pthread. For an example, see https://cygwin.com/ml/cygwin/2017-03/msg00113.html Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* errno: Stop using _impure_ptr->_errno completelyCorinna Vinschen2017-03-103-6/+5
| | | | | | | | We use errno AKA _REENT->_errno since the last century and only set _impure_ptr->_errno for backward compat. Stop that. Also, remove the last check for _impure_ptr->_errno in Cygwin code. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Drop redundant brackets in call to _reclaim_reentCorinna Vinschen2017-03-101-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Implement dladdr() (partially)Jon Turney2017-03-086-1/+61
| | | | | | | Note that this always returns with dli_sname and dli_saddr set to NULL, indicating no symbol matching addr could be found. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* yield: Don't lower thread priority, it leads to starvationCorinna Vinschen2017-03-081-5/+6
| | | | | | | ...and it's not required anymore to have the same effect as the original code post-XP. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Emit correct errno EAGAIN if we can't create another threadCorinna Vinschen2017-03-081-0/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Export timingsafe_bcmp and timingsafe_memcmpJon Turney2017-03-074-1/+7
| | | | Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* Document pthread_cond_wait change in release notesCorinna Vinschen2017-03-071-0/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>