[Spread-cvs] commit: r865 - in trunk/stdutil: . src src/stdutil src/stdutil/private
jschultz at spread.org
jschultz at spread.org
Thu Nov 17 14:11:47 EST 2016
Author: jschultz
Date: 2016-11-17 14:11:47 -0500 (Thu, 17 Nov 2016)
New Revision: 865
Added:
trunk/stdutil/include/
Modified:
trunk/stdutil/CHANGELOG
trunk/stdutil/Makefile
trunk/stdutil/README
trunk/stdutil/STDUTIL_LICENSE
trunk/stdutil/src/stdarr.c
trunk/stdutil/src/stdcarr.c
trunk/stdutil/src/stdfd.c
trunk/stdutil/src/stdhash.c
trunk/stdutil/src/stdit.c
trunk/stdutil/src/stdskl.c
trunk/stdutil/src/stdthread.c
trunk/stdutil/src/stdtime.c
trunk/stdutil/src/stdutil.c
trunk/stdutil/src/stdutil/private/stdarch.h
trunk/stdutil/src/stdutil/private/stdarch_autoconf.h.in
trunk/stdutil/src/stdutil/private/stdarch_wintel32.h
trunk/stdutil/src/stdutil/private/stdarr_p.h
trunk/stdutil/src/stdutil/private/stdcarr_p.h
trunk/stdutil/src/stdutil/private/stddll_p.h
trunk/stdutil/src/stdutil/private/stdhash_p.h
trunk/stdutil/src/stdutil/private/stdit_p.h
trunk/stdutil/src/stdutil/private/stdskl_p.h
trunk/stdutil/src/stdutil/private/stdthread_p.h
trunk/stdutil/src/stdutil/stdarr.h
trunk/stdutil/src/stdutil/stdcarr.h
trunk/stdutil/src/stdutil/stddefines.h
trunk/stdutil/src/stdutil/stddll.h
trunk/stdutil/src/stdutil/stderror.h
trunk/stdutil/src/stdutil/stdfd.h
trunk/stdutil/src/stdutil/stdhash.h
trunk/stdutil/src/stdutil/stdit.h
trunk/stdutil/src/stdutil/stdskl.h
trunk/stdutil/src/stdutil/stdthread.h
trunk/stdutil/src/stdutil/stdtime.h
trunk/stdutil/src/stdutil/stdutil.h
Log:
Upgrading trunk to use stdutil 1.1.3
svn merge -r422:864 svn+ssh://svn.spread.org/spread/vendor/stdutil/current stdutil
Modified: trunk/stdutil/CHANGELOG
===================================================================
--- trunk/stdutil/CHANGELOG 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/CHANGELOG 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,3 +1,15 @@
+v1.1.3, January 2012
+
+Few minor bug fixes and improvements.
+
+v1.1.2, May 2010
+
+Added a timedwait function to stdthread.h Not currently supported on Win32.
+
+v1.1.1, April 2010
+
+Changed top level Makefile to automatically run configure if not already done.
+
v1.1.0, May 2009
Changed the build so that the functions in stdthread.h are always defined, but most will simply
Modified: trunk/stdutil/Makefile
===================================================================
--- trunk/stdutil/Makefile 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/Makefile 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-all:
+all: src/Makefile
cd src; $(MAKE) all
clean:
@@ -15,3 +15,7 @@
rm -rf autom4te.cache
rm -f configure
cd src; $(MAKE) uberclean
+
+src/Makefile:
+ ./configure
+
Modified: trunk/stdutil/README
===================================================================
--- trunk/stdutil/README 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/README 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-This is the v1.1.0 (May 2009) distribution of the StdUtil library.
+This is the v1.1.3 (January 2012) distribution of the StdUtil library.
DESCRIPTION:
@@ -16,7 +16,7 @@
subsequent release in HTML format in the docs directory. The
documentation will also be available at:
-http://www.cnds.jhu.edu/software/stdutil/docs
+http://www.stdutil.org
BUILDING:
@@ -26,10 +26,10 @@
PROBLEMS:
-Please report bugs and/or bug fixes to jschultz at cnds.jhu.edu with a
+Please report bugs and/or bug fixes to jschultz at spreadconcepts.com with a
gdb compatible core (if possible) and any information that could help
fix the problem.
Enjoy,
-John Schultz <jschultz at cnds.jhu.edu>
-May 2009
+John Schultz <jschultz at spreadconcepts.com>
+January 2012
Modified: trunk/stdutil/STDUTIL_LICENSE
===================================================================
--- trunk/stdutil/STDUTIL_LICENSE 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/STDUTIL_LICENSE 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The Original Software is:
* The StdUtil Library
*
* Contributors:
- * Creator - John Lane Schultz (jschultz at cnds.jhu.edu)
+ * Creator - John Lane Schultz (jschultz at spreadconcepts.com)
* The Center for Networking and Distributed Systems
* (CNDS - http://www.cnds.jhu.edu)
*
@@ -31,8 +31,6 @@
* The Johns Hopkins University
* 3400 N. Charles St., MD 21218
*
- * or email director [at] cnds.jhu.edu.
- *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
Modified: trunk/stdutil/src/stdarr.c
===================================================================
--- trunk/stdutil/src/stdarr.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdarr.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdcarr.c
===================================================================
--- trunk/stdutil/src/stdcarr.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdcarr.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdfd.c
===================================================================
--- trunk/stdutil/src/stdfd.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdfd.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdhash.c
===================================================================
--- trunk/stdutil/src/stdhash.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdhash.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
@@ -505,21 +505,25 @@
search = stdhash_low_find(h, overwrite, key, &hcode);
- if (STDHASH_POS_EMPTY(search)) { /* found a truly empty hole: create+insert a new node */
+ if (STDHASH_POS_EMPTY(search)) { /* if we found a truly empty hole: create+insert a new node */
if ((*search = (stdhash_node*) malloc(STDHASH_NODE_SIZE(h->ksize, h->vsize))) == NULL) {
ret = STDENOMEM;
goto stdhash_low_insert_end;
}
- ++h->num_nodes; /* increased # of nodes in table */
- } /* else found a useable node */
+ ++h->num_nodes; /* increased # of nodes in and size of table */
+ ++h->size;
- /* update the table's meta information */
+ } else if (!overwrite) { /* else if !overwrite -> we found an inactive node we can reuse */
+ STDSAFETY_CHECK(STDHASH_POS_INACTIVE(search));
+ ++h->size;
- ++h->size;
+ } else { /* else we found and are overwriting an existing node; num_nodes and size don't change */
+ STDSAFETY_CHECK(!STDHASH_POS_INACTIVE(search));
+ }
- if (search < h->begin) { /* insert was before begin */
+ if (search < h->begin) { /* if insert was before begin */
h->begin = search;
}
Modified: trunk/stdutil/src/stdit.c
===================================================================
--- trunk/stdutil/src/stdit.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdit.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdskl.c
===================================================================
--- trunk/stdutil/src/stdskl.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdskl.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdthread.c
===================================================================
--- trunk/stdutil/src/stdthread.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdthread.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
@@ -537,11 +537,11 @@
* stdmutex_fast_cond_wait: Wait on a condition protected by a fast mutex.
***********************************************************************************************/
-STDINLINE static stdcode stdmutex_fast_cond_wait(stdmutex *mut, stdcond *cond)
+STDINLINE static stdcode stdmutex_fast_cond_timedwait(stdmutex *mut, stdcond *cond, const stdtime *abs_time)
# if defined(_WIN32)
{
/* NOTE: this WIN32 code works for both fast and recursive mutexes:
- the WIN32 stdmutex_rcrsv_cond_wait is a call through to this fcn
+ the WIN32 stdmutex_rcrsv_cond_timedwait is a call through to this fcn
*/
stdcode ret = STDESUCCESS;
@@ -556,22 +556,29 @@
STDSAFETY_CHECK(mut->mut_type == STDMUTEX_FAST || mut->mut_type == STDMUTEX_RCRSV);
+ /* NOTE: we can't implement timedwaits on windows yet */
+
+ if (abs_time != NULL) {
+ ret = STDENOSYS;
+ goto stdmutex_fast_cond_timedwait_end;
+ }
+
/* check for recursive mutexes that owner only has one lock */
if (mut->mut_type == STDMUTEX_RCRSV) {
if ((ret = stdmutex_is_owner(mut, &grab_cnt)) != STDESUCCESS) {
- goto stdmutex_fast_cond_wait_end;
+ goto stdmutex_fast_cond_timedwait_end;
}
if (grab_cnt == 0) {
ret = STDEPERM;
- goto stdmutex_fast_cond_wait_end;
+ goto stdmutex_fast_cond_timedwait_end;
}
if (grab_cnt != 1) {
ret = STDEBUSY;
- goto stdmutex_fast_cond_wait_end;
+ goto stdmutex_fast_cond_timedwait_end;
}
}
@@ -585,26 +592,26 @@
if (DuplicateHandle(curr_proc, curr_thread, curr_proc, &dup_handle, 0, TRUE, DUPLICATE_SAME_ACCESS) == 0) {
ret = (stdcode) GetLastError();
- goto stdmutex_fast_cond_wait_end;
+ goto stdmutex_fast_cond_timedwait_end;
}
/* allocate a node to put in the condition's linked list of sleeping threads */
if ((my_link = (stdcond_link*) malloc(sizeof(stdcond_link))) == NULL) {
ret = STDENOMEM;
- goto stdmutex_fast_cond_wait_malloc;
+ goto stdmutex_fast_cond_timedwait_malloc;
}
/* grab the condition's internal lock */
if ((ret = stdmutex_impl_grab(&cond->lock, STDTRUE)) != STDESUCCESS) {
- goto stdmutex_fast_cond_wait_grab_cond;
+ goto stdmutex_fast_cond_timedwait_grab_cond;
}
/* drop mut */
if ((ret = stdmutex_drop(mut)) != STDESUCCESS) {
- goto stdmutex_fast_cond_wait_drop_mut;
+ goto stdmutex_fast_cond_timedwait_drop_mut;
}
reacquire = STDTRUE; /* try to reacquire mut at end of this fcn */
@@ -613,14 +620,14 @@
if ((prev_priority = GetThreadPriority(curr_thread)) == THREAD_PRIORITY_ERROR_RETURN) {
ret = (stdcode) GetLastError();
- goto stdmutex_fast_cond_wait_ThreadPriority;
+ goto stdmutex_fast_cond_timedwait_ThreadPriority;
}
/* bump up priority so that waker thread can never infinitely loop in a wake call (see below) */
if (SetThreadPriority(curr_thread, THREAD_PRIORITY_HIGHEST) == 0) {
ret = (stdcode) GetLastError();
- goto stdmutex_fast_cond_wait_ThreadPriority;
+ goto stdmutex_fast_cond_timedwait_ThreadPriority;
}
/* link onto end of sleepers list */
@@ -665,22 +672,22 @@
ret = (stdcode) GetLastError();
}
- goto stdmutex_fast_cond_wait_end;
+ goto stdmutex_fast_cond_timedwait_end;
/* error handling and return */
- stdmutex_fast_cond_wait_ThreadPriority:
- stdmutex_fast_cond_wait_drop_mut:
+ stdmutex_fast_cond_timedwait_ThreadPriority:
+ stdmutex_fast_cond_timedwait_drop_mut:
stdmutex_impl_drop(&cond->lock);
- stdmutex_fast_cond_wait_grab_cond:
+ stdmutex_fast_cond_timedwait_grab_cond:
free(my_link);
- stdmutex_fast_cond_wait_malloc:
+ stdmutex_fast_cond_timedwait_malloc:
CloseHandle(dup_handle);
STDSAFETY_CHECK(ret != STDESUCCESS);
- stdmutex_fast_cond_wait_end:
+ stdmutex_fast_cond_timedwait_end:
if (reacquire) {
ret |= stdmutex_grab(mut);
}
@@ -689,9 +696,22 @@
}
# else
{
+ stdcode ret;
+ struct timespec timeout;
+
STDSAFETY_CHECK(mut->mut_type == STDMUTEX_FAST);
- return pthread_cond_wait(cond, &mut->mut.fast);
+ if (abs_time == NULL) {
+ ret = pthread_cond_wait(cond, &mut->mut.fast);
+
+ } else {
+ timeout.tv_sec = abs_time->sec;
+ timeout.tv_nsec = abs_time->nano;
+
+ ret = pthread_cond_timedwait(cond, &mut->mut.fast, &timeout);
+ }
+
+ return ret;
}
# endif
@@ -894,59 +914,70 @@
}
/************************************************************************************************
- * stdmutex_rcrsv_cond_wait: Atomically unlock a 'mut' and wait on 'cond.'
+ * stdmutex_rcrsv_cond_timedwait: Atomically unlock a 'mut' and wait on 'cond' or until abs_time
***********************************************************************************************/
-STDINLINE static stdcode stdmutex_rcrsv_cond_wait(stdmutex *mut, stdcond *cond)
+STDINLINE static stdcode stdmutex_rcrsv_cond_timedwait(stdmutex *mut, stdcond *cond, const stdtime *abs_time)
# if defined(_WIN32)
{
/* NOTE: the WIN32 code works for both fast and recursive mutexes:
- currently stdmutex_rcrsv_cond_wait is just a call through
+ currently stdmutex_rcrsv_cond_timedwait is just a call through
*/
- return stdmutex_fast_cond_wait(mut, cond);
+ return stdmutex_fast_cond_timedwait(mut, cond);
}
# else
{
stdcode ret;
stdmutex_rcrsv * rmut = &mut->mut.rcrsv;
+ struct timespec timeout;
STDSAFETY_CHECK(mut->mut_type == STDMUTEX_RCRSV);
if ((ret = stdmutex_impl_grab(&rmut->outer_lock, STDTRUE)) != STDESUCCESS) {
- goto stdmutex_rcrsv_cond_wait_end;
+ goto stdmutex_rcrsv_cond_timedwait_end;
}
if (mut->mut_type != STDMUTEX_RCRSV || rmut->owner_cnt < 0 || rmut->num_waiting < 0) {
ret = STDEINVAL;
- goto stdmutex_rcrsv_cond_wait_drop;
+ goto stdmutex_rcrsv_cond_timedwait_drop;
}
if (rmut->owner_cnt == 0 || !stdthread_eq(rmut->owner_id, stdthread_self())) {
ret = STDEPERM;
- goto stdmutex_rcrsv_cond_wait_drop;
+ goto stdmutex_rcrsv_cond_timedwait_drop;
}
if (rmut->owner_cnt != 1) {
ret = STDEBUSY;
- goto stdmutex_rcrsv_cond_wait_drop;
+ goto stdmutex_rcrsv_cond_timedwait_drop;
}
++rmut->num_waiting;
rmut->owner_cnt = 0;
stdmutex_impl_drop(&rmut->outer_lock);
- pthread_cond_wait(cond, &rmut->inner_lock);
+
+ if (abs_time == NULL) {
+ ret = pthread_cond_wait(cond, &rmut->inner_lock);
+
+ } else {
+ timeout.tv_sec = abs_time->sec;
+ timeout.tv_nsec = abs_time->nano;
+
+ ret = pthread_cond_timedwait(cond, &rmut->inner_lock, &timeout);
+ }
+
stdmutex_impl_grab(&rmut->outer_lock, STDTRUE);
--rmut->num_waiting;
rmut->owner_cnt = 1;
rmut->owner_id = stdthread_self();
- stdmutex_rcrsv_cond_wait_drop:
+ stdmutex_rcrsv_cond_timedwait_drop:
stdmutex_impl_drop(&rmut->outer_lock);
- stdmutex_rcrsv_cond_wait_end:
+ stdmutex_rcrsv_cond_timedwait_end:
return ret;
}
# endif
@@ -1195,45 +1226,27 @@
STDINLINE stdcode stdcond_wait(stdcond *cond, stdmutex *mut)
{
- stdcode ret = STDEINVAL;
-
- switch (mut->mut_type) {
-
- case STDMUTEX_FAST:
- ret = stdmutex_fast_cond_wait(mut, cond);
- break;
-
- case STDMUTEX_RCRSV:
- ret = stdmutex_rcrsv_cond_wait(mut, cond);
- break;
-
- case STDMUTEX_NULL:
- ret = STDESUCCESS;
- break;
- }
-
- return ret;
+ return stdcond_timedwait(cond, mut, NULL);
}
-#if 0 /* comment out stdcond_wait_timed */
-
/************************************************************************************************
- * stdcond_wait_timed:
+ * stdcond_timedwait:
***********************************************************************************************/
-STDINLINE stdcode stdcond_wait_timed(stdcond * cond,
- stdmutex * mut)
+STDINLINE stdcode stdcond_timedwait(stdcond * cond,
+ stdmutex * mut,
+ const stdtime * abs_time)
{
stdcode ret = STDEINVAL;
switch (mut->mut_type) {
case STDMUTEX_FAST:
- ret = stdmutex_fast_cond_wait_timed(mut, cond);
+ ret = stdmutex_fast_cond_timedwait(mut, cond, abs_time);
break;
case STDMUTEX_RCRSV:
- ret = stdmutex_rcrsv_cond_wait_timed(mut, cond);
+ ret = stdmutex_rcrsv_cond_timedwait(mut, cond, abs_time);
break;
case STDMUTEX_NULL:
@@ -1244,91 +1257,8 @@
return ret;
}
-/************************************************************************************************
- * stdcond_wait_timed:
- ***********************************************************************************************/
-
-STDINLINE stdcode stdcond_wait_timed(stdcond *cond, stdmutex *mut, const stdtime *abs_time)
-# if defined(_WIN32)
-{
- /* TODO: figure out how + implement me! */
- return ENOSYS;
-}
-# else
-{
- /* TODO: needs work; make it look like stdmutex_*_cond_wait */
- struct timespec timeout;
- stdmutex_impl * mut_impl = NULL;
- long grab_cnt = 0;
- stdcode ret;
-
- timeout.tv_sec = abs_time->m_Sec;
- timeout.tv_nsec = abs_time->m_Nsec;
-
- if ((ret = stdmutex_is_owner(mut, &grab_cnt)) != STDESUCCESS) {
- assert(STDFALSE /* stdcond_wait_timed: user race condition on mut, protect calls to fini! */);
- goto stdcond_wait_timed_fail;
- }
-
- if (grab_cnt == 0) {
- assert(STDFALSE /* stdcond_wait_timed: user doesn't own mut! */);
- ret = EPERM;
- goto stdcond_wait_timed_EPERM;
- }
-
- if (grab_cnt != 1) {
- assert(STDFALSE /* stdcond_wait: recursive mutex must have a grab_cnt of 1! */);
- ret = EINVAL;
- goto stdcond_wait_timed_EINVAL;
- }
-
- switch (mut->mut_type) {
- case STDMUTEX_FAST:
- {
- stdmutex_fast * fmut = &mut->m_Mutex.m_Fast;
-
- fmut->owner_cnt = 0;
- mut_impl = &fmut->m_Lock;
- }
- break;
-
- case STDMUTEX_RCRSV:
- {
- stdmutex_rcrsv * rmut = &mut->mut.rcrsv;
-
- rmut->owner_cnt = 0;
- mut_impl = &rmut->inner_lock;
- }
- break;
-
- default:
- assert(STDFALSE);
- ret = EINVAL;
- goto stdcond_wait_timed_EINVAL;
- }
-
- if ((ret = pthread_cond_timedwait(cond, mut_impl, &timeout)) != STDESUCCESS) {
- goto stdcond_wait_timed_pcond_timedwait;
- }
-
- assert(ret == STDESUCCESS);
- goto stdcond_wait_timed_end;
-
- /* error handling and return */
-
- stdcond_wait_timed_pcond_timedwait:
- stdcond_wait_timed_EINVAL:
- stdcond_wait_timed_fail:
- assert(ret != STDESUCCESS);
-
- stdcond_wait_timed_end:
- return ret;
-}
-# endif
#endif
-#endif
-
#ifdef __cplusplus
}
#endif
Modified: trunk/stdutil/src/stdtime.c
===================================================================
--- trunk/stdutil/src/stdtime.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdtime.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdarch.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdarch.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdarch.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdarch_autoconf.h.in
===================================================================
--- trunk/stdutil/src/stdutil/private/stdarch_autoconf.h.in 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdarch_autoconf.h.in 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdarch_wintel32.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdarch_wintel32.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdarch_wintel32.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdarr_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdarr_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdarr_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdcarr_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdcarr_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdcarr_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stddll_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stddll_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stddll_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdhash_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdhash_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdhash_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdit_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdit_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdit_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdskl_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdskl_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdskl_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/private/stdthread_p.h
===================================================================
--- trunk/stdutil/src/stdutil/private/stdthread_p.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/private/stdthread_p.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdarr.h
===================================================================
--- trunk/stdutil/src/stdutil/stdarr.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdarr.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdcarr.h
===================================================================
--- trunk/stdutil/src/stdutil/stdcarr.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdcarr.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stddefines.h
===================================================================
--- trunk/stdutil/src/stdutil/stddefines.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stddefines.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stddll.h
===================================================================
--- trunk/stdutil/src/stdutil/stddll.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stddll.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stderror.h
===================================================================
--- trunk/stdutil/src/stdutil/stderror.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stderror.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
@@ -60,13 +60,13 @@
#define STDEXCEPTION(x) stderr_output(STDERR_ABORT, 0, "STDEXCEPTION: File: %s; Line: %d: %s", __FILE__, __LINE__, #x)
#if defined(STDSAFETY_CHECKS)
-# define STDSAFETY_CHECK(x) { if (!(x)) { STDEXCEPTION(safety check (x) failed); } }
+# define STDSAFETY_CHECK(x) do { if (!(x)) { STDEXCEPTION(safety check (x) failed); } } while (0)
#else
# define STDSAFETY_CHECK(x)
#endif
#if defined(STDBOUNDS_CHECKS)
-# define STDBOUNDS_CHECK(x) { if (!(x)) { STDEXCEPTION(bounds check (x) failed); } }
+# define STDBOUNDS_CHECK(x) do { if (!(x)) { STDEXCEPTION(bounds check (x) failed); } } while (0)
#else
# define STDBOUNDS_CHECK(x)
#endif
Modified: trunk/stdutil/src/stdutil/stdfd.h
===================================================================
--- trunk/stdutil/src/stdutil/stdfd.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdfd.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdhash.h
===================================================================
--- trunk/stdutil/src/stdutil/stdhash.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdhash.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdit.h
===================================================================
--- trunk/stdutil/src/stdutil/stdit.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdit.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdskl.h
===================================================================
--- trunk/stdutil/src/stdutil/stdskl.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdskl.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdthread.h
===================================================================
--- trunk/stdutil/src/stdutil/stdthread.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdthread.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
@@ -23,6 +23,7 @@
#define stdthread_h_2000_03_14_12_28_17_jschultz_at_cnds_jhu_edu
#include <stdutil/stddefines.h>
+#include <stdutil/stdtime.h>
#ifdef __cplusplus
extern "C" {
@@ -72,7 +73,7 @@
STDINLINE stdcode stdcond_wake_all(stdcond *cond);
STDINLINE stdcode stdcond_wait(stdcond *cond, stdmutex *mut);
-/*STDINLINE stdcode stdcond_timedwait(stdcond *cond, stdmutex *mut, long ns);*/
+STDINLINE stdcode stdcond_timedwait(stdcond *cond, stdmutex *mut, const stdtime *abstime);
# ifdef __cplusplus
}
Modified: trunk/stdutil/src/stdutil/stdtime.h
===================================================================
--- trunk/stdutil/src/stdutil/stdtime.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdtime.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil/stdutil.h
===================================================================
--- trunk/stdutil/src/stdutil/stdutil.h 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil/stdutil.h 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
Modified: trunk/stdutil/src/stdutil.c
===================================================================
--- trunk/stdutil/src/stdutil.c 2016-11-17 19:03:52 UTC (rev 864)
+++ trunk/stdutil/src/stdutil.c 2016-11-17 19:11:47 UTC (rev 865)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000-2009, The Johns Hopkins University
+/* Copyright (c) 2000-2012, The Johns Hopkins University
* All rights reserved.
*
* The contents of this file are subject to a license (the ``License'').
More information about the Spread-cvs
mailing list