summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/winbase.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix usage of recently fixed Interlocked* functions.Eric Blake2008-07-121-5/+5
| | | | | * winbase.h (ilockincr, ilockdecr, ilockexch, ilockcmpexch): Add volatile qualifier, to match Interlocked* functions.
* * pinfo.cc (pinfo::init): Define sa_buf as PSECURITY_ATTRIBUTES andCorinna Vinschen2005-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | allocate dynamically. (pinfo::set_acl): Replace sa_buf by dynamically allocated acl_buf. * sec_acl.cc (setacl): Allocate acl dynamically. * sec_helper.cc (sec_acl): Add test for alignment of acl when DEBUGGING is defined. (__sec_user): Same for sa_buf. * security.cc (verify_token): Define sd_buf as PSECURITY_DESCRIPTOR and allocate dynamically. (alloc_sd): Allocate acl dynamically. security.h (sec_user_nih): Change first parameter to SECURITY_ATTRIBUTES *. (sec_user): Ditto. * sigproc.cc (wait_sig): Define sa_buf as PSECURITY_ATTRIBUTES and allocate dynamically. * syscalls.cc (seteuid32): Define dacl_buf as PACL and allocate dynamically. * uinfo.cc (cygheap_user::init): Define sa_buf as PSECURITY_ATTRIBUTES and allocate dynamically. * winbase.h (ilockincr): Mark first argument of inline assembly as earlyclobber. (ilockdecr): Ditto.
* * winbase.h (ilockincr): Add more neverending changes from the inexplicableChristopher Faylor2004-06-041-2/+2
| | | | | world of gcc asm constraint magic. Should stop random crashes. (ilockdecr): Ditto.
* * winbase.h (ilockincr): More changes from the inexplicable world of gcc asmChristopher Faylor2004-06-031-2/+10
| | | | | magic. (ilockdecr): Ditto.
* * winbase.h (ilockincr): YA correction to ensure correct operation with noChristopher Faylor2004-06-031-4/+4
| | | | | optimization. (ilockdecr): Ditto.
* * winbase.h: Semi-revert previous patch as it caused strange behavior. UseChristopher Faylor2004-05-251-4/+4
| | | | syntax similar to that recommended in mingw-dvlpr.
* * winbase.h: Add proper attributions for memory operands throughout.Christopher Faylor2004-05-251-6/+6
|
* * include/cygwin/version.h: Bump api minor version number.Christopher Faylor2004-05-251-2/+2
| | | | * cygwin.din: Export atoll.
* * cygthread.cc (cygthread::stub): Properly establish _threadinfo environment.Christopher Faylor2003-12-031-45/+0
| | | | | | | | | | | | | | | | | | | | | | | (cygthread::stub2): New function. (cygthread::simplestub): Ditto. (cygthread::simplestub2): New function. * cygthread.h (cygthread::stub2): Declare new function. (cygthread::simplestub2): Ditto. * cygtls.h (_threadinfo::call): Declare new function. (_threadinfo::call2): Ditto. * dcrt0.cc (dll_crt0_1): Accommodate new _threadinfo::init which doesn't return pointer to tls. (_dll_crt0): Remove obsolete DECLARE_TLS_STORAGE. (dll_crt0): Ditto. * exceptions.cc (_threadinfo::call): New function. (_threadinfo::call2): Ditto. (_threadinfo::init): Don't return pointer. * thread.cc (pthread::thread_init_wrapper): Properly establish _threadinfo environment. (pthread::thread_init_wrapper2): New function. * thread.h (pthread::thread_init_wrapper): Remove noreturn attribute (pthread::thread_init_wrapper2): Declare new function. * winbase.h: Remove obsolete code.
* Eliminate use of sigframe and sigthread throughout.Christopher Faylor2003-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (DLL_OFILES): Add sigfe.o. Remove reliance on cygwin.def from cygwin0.dll dependency since dependence on sigfe.o implies that. Generate def file on the fly using 'gendef'. * configure.in: Don't auto-generate cygwin.def. * configure: Regenerate. * cygwin.din: Add SIGFE stuff where appropriate. * dcrt0.cc (dll_crt0_1): Initialize cygwin tls early in process startup. Set _main_tls to address of the main thread's cygwin tls. * debug.h: Remove now unneeded WFSO and WFMO declarations. * exceptions.cc (_last_thread): Define. (set_thread_state_for_signals): New function. (reset_thread_exception_for_signals): Ditto. (init_thread_for_signals): Ditto. (delete_thread_for_signals): Ditto. (capture_thread_for_signals): Ditto. (handle_exceptions): Set return address explicitly for exceptions prior to calling sig_send. (interrupt_on_return): Eliminate. (setup_handler): Add preliminary implementation for dealing with thread-specific signals by querying _main_tls. (signal_exit): Use cygthread::main_thread_id instead of mainthread.id. (call_signal_handler_now): For now, just handle the main thread. * fork.cc (vfork): Save and restore main _my_tls. * gendef: New file. Generates def file and sigfe.s file. * gentls_offsets: New file. Generates offsets for perl to use in sigfe.s. * how-signals-work.txt: Mention that info is obsolete. * init.cc (dll_entry): Initialize cygwin tls storage here. * miscfuncs.cc (low_priority_sleep): Make a C function for easier calling from asm. * perthread.h (vfork_save::tls): New element. * signal.cc (nanosleep): Replace previous use of sigframe.call_signal_handler_now with straight call to call_signal_handler_now. (abort): Ditto. * syscalls.cc (readv): Ditto. * termios.cc (tcsetattr): Ditto. * wait.cc (wait4): Ditto. * sigproc.cc (sig_dispatch_pending): Ditto. (sig_send): Ditto. * sigproc.h: Declare call_signal_handler_now. * thread.cc (pthread::thread_init_wrapper): Initialize cygwin tls. Remove obsolete and unworking signal stuff. * thread.h (verifyable_object::sigs): Eliminate. (verifyable_object::sigmask): Eliminate. (verifyable_object::sigtodo): Eliminate. (verifyable_object::exit): Make attribute noreturn. (verifyable_object::thread_init_wrapper): Ditto. (pthread_null::exit): Ditto. * winbase.h (__stackbase): Always define. * winsup.h (low_priority_sleep): Declare as a "C" function. * include/cygwin/version.h: Bump API version to reflect sigwait export. * include/sys/queue.h: Protect SLIST_ENTRY from previous declaration. * signal.cc (sigwait): Implement. * select.cc (fhandler_base::ready_for_read): Add debugging output. * devices.h: Define more device pointers via their storage. * devices.in: Don't parse things like /dev/inet/tcp, as they really have no meaning. * devices.cc: Regenerate. * gendevices: Set proper protection for output file. * cygtls.h: New file. * gendef: New file. * gentls_offsets: New file. * tlsoffsets.h: New file. Autogenerated. * config/i386/longjmp.c: Remove. File subsumed by gendef output. * config/i386/makefrag: Remove obsolete file. * fhandler.cc: Remove spurious access_worker declaration. * spawn.cc (spawnve): Make debugging output more accurate. * cygwin-gperf: Remove. * devices.cc: Remove.
* * winbase.h: Turn on inline versions of Interlocked* by default.Christopher Faylor2002-12-141-14/+28
| | | | * winbase.h: Fixup inline asm functions. Add ilockcmpexch.
* * cygwin.sc: Add recent changes from ld sources.Christopher Faylor2002-06-231-0/+7
| | | | | * winsup.h: Move #ifdef EXPCGF code into "winbase.h". * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
* * debug.cc (makethread): Eliminate unneeded function call.Christopher Faylor2001-11-301-7/+6
| | | | | | | | | | * miscfuncs.cc (tls_ix): Predefine. * perthread.h (set_reent): Eliminate. (get_reent): Ditto. * winbase.h (my_tlsalloc): Use global stack base pointer. Set newly allocated location to NULL. (my_tlssetvalue): Use global stack base pointer. (my_tlsgetvalue): Ditto.
* * cygwin.din (ualarm): New export.Christopher Faylor2001-11-281-0/+84
* dcrt0.cc (_dll_crt0): Add experimental tls storage declaration. (dll_crt0): Ditto. * debug.cc (thread_stub): Ditto. * thread.cc: Minor cleanup. (__pthread_create): Add experimental tls storage declaration. * miscfuncs.cc: Define tls index. * winsup.h: Declare experimental tls storage. * window.cc (alarm): Use old timer return from setitimer. (ualarm): New function.