summaryrefslogtreecommitdiff
path: root/test/testmutexscope.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespaces in *.c.Ivan Zhakov2022-11-201-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* test/testmutexscope: Fix -Wvoid-pointer-to-enum-castYann Ylavic2022-06-231-2/+2
| | | | | | | | | * test/testmutexscope.c(test_mech_mode, eachThread): Cast to apr_uintptr_t first before converting pointer to/from enum. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902182 13f79535-47bb-0310-9956-ffa450edef68
* make this more obviousJim Jagielski2017-04-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790149 13f79535-47bb-0310-9956-ffa450edef68
* locks: introduce apr_{thread,proc,global}_mutex_timedlock().Yann Ylavic2015-03-191-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For proc mutexes, the new mechanism APR_LOCK_DEFAULT_TIMED usable at creation time allows for the best mechanism to be elected (unixes: 1 to 3, or specific: 4 to 7): 1. PROC_PTHREAD if pthread_mutex_timedlock() and pthread_mutex_set_robust_np() are both available, 2. SYSV if semtimedop() is availale, 3. POSIXSEM if sem_timedwait() is available, 4. BeOS' acquire_sem_etc() if available, 5. NetWare falls back to apr_thread_mutex_timedlock() as for others functions, 6. OS2's DosRequestMutexSem(), 7. Windows' WaitForSingleObject(). Otherwise (like when fcntl and flock only are availble, if that's ever possible), APR_ENOTIMPL is returned. For thread mutexes, the new flag APR_THREAD_MUTEX_TIMED, usable at create() time still, allows to switch to an implementation using a condition variable and apr_thread_cond_timedwait() when if no native mechanism is available (eg. NetWare, pthreads but without pthread_mutex_timedlock() available). On windows, this initializes a WaitForSingleObject()able handle (Mutex) instead of the fastest (but not timeout-able) CRITICAL_SECTION used by default. All apr_{thread,proc,global}_mutex_timedlock() functions can take a relative or absolute time, thanks to the last (boolean) argument. Test suite updated accordingly. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667900 13f79535-47bb-0310-9956-ffa450edef68
* assert() games:Jeff Trawick2013-09-151-0/+2
| | | | | | | | | | testmutexscope relies on assert() to check as well as to run at all, so make sure NDEBUG isn't defined. testpass and teststr don't use assert(), so don't include <assert.h>. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1523479 13f79535-47bb-0310-9956-ffa450edef68
* Cure win32 ills, apr created threads must use apr_thread_exit.William A. Rowe Jr2007-10-141-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584471 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-031-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-131-49/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* static main() doesn't workJeff Trawick2003-03-241-1/+1
| | | | | | | | Submitted by: Craig Rodrigues <rodrigc@attbi.com> Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64448 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.Thom May2003-01-011-1/+1
| | | | | | | No functional changes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* use new time conversion macros in place of APR_USEC_PER_SECBrian Pane2002-07-051-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63565 13f79535-47bb-0310-9956-ffa450edef68
* At least this one is an easy fix. All the tests build once again,William A. Rowe Jr2002-05-131-1/+1
| | | | | | | even on devstudio 7.0 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63392 13f79535-47bb-0310-9956-ffa450edef68
* add a new test program toJeff Trawick2002-05-091-0/+256
1) verify that APR global mutexes block out threads within the same process 2) discover whether or not APR proc mutexes block out threads within the same process git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63375 13f79535-47bb-0310-9956-ffa450edef68