[Midnightbsd-cvs] src [10649] trunk/lib/librt: tag
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jun 9 15:19:57 EDT 2018
Revision: 10649
http://svnweb.midnightbsd.org/src/?rev=10649
Author: laffer1
Date: 2018-06-09 15:19:57 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
tag
Modified Paths:
--------------
trunk/lib/librt/Makefile
trunk/lib/librt/Version.map
trunk/lib/librt/aio.c
trunk/lib/librt/mq.c
trunk/lib/librt/sigev_thread.c
trunk/lib/librt/sigev_thread.h
trunk/lib/librt/timer.c
Added Paths:
-----------
trunk/lib/librt/tests/
trunk/lib/librt/tests/Makefile
Property Changed:
----------------
trunk/lib/librt/Version.map
Modified: trunk/lib/librt/Makefile
===================================================================
--- trunk/lib/librt/Makefile 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/Makefile 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,5 +1,8 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/lib/librt/Makefile 282854 2015-05-13 11:32:55Z ngie $
+.include <bsd.own.mk>
+
LIB=rt
SHLIB_MAJOR= 1
CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}
@@ -18,4 +21,8 @@
VERSION_MAP= ${.CURDIR}/Version.map
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.lib.mk>
Modified: trunk/lib/librt/Version.map
===================================================================
--- trunk/lib/librt/Version.map 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/Version.map 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,5 +1,5 @@
-/*
- * $MidnightBSD$
+/* $MidnightBSD$
+ * $FreeBSD: stable/10/lib/librt/Version.map 169090 2007-04-29 14:01:45Z deischen $
*/
FBSD_1.0 {
Property changes on: trunk/lib/librt/Version.map
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/librt/aio.c
===================================================================
--- trunk/lib/librt/aio.c 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/aio.c 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 2005 David Xu <davidxu at freebsd.org>
* All rights reserved.
@@ -23,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/librt/aio.c 157078 2006-03-24 03:24:27Z davidxu $
*
*/
Modified: trunk/lib/librt/mq.c
===================================================================
--- trunk/lib/librt/mq.c 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/mq.c 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2006 David Xu <davidxu at freebsd.org>
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/librt/mq.c 213153 2010-09-25 01:57:47Z davidxu $
*/
#include <sys/cdefs.h>
Modified: trunk/lib/librt/sigev_thread.c
===================================================================
--- trunk/lib/librt/sigev_thread.c 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/sigev_thread.c 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 2005 David Xu <davidxu at freebsd.org>
* All rights reserved.
@@ -23,12 +24,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/librt/sigev_thread.c 252412 2013-06-30 08:59:33Z ed $
*
*/
#include <sys/types.h>
-#include <machine/atomic.h>
#include "namespace.h"
#include <err.h>
@@ -35,6 +35,7 @@
#include <errno.h>
#include <ucontext.h>
#include <sys/thr.h>
+#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -51,7 +52,7 @@
static struct sigev_list_head sigev_hash[HASH_QUEUES];
static struct sigev_list_head sigev_all;
static LIST_HEAD(,sigev_thread) sigev_threads;
-static unsigned int sigev_generation;
+static atomic_int sigev_generation;
static pthread_mutex_t *sigev_list_mtx;
static pthread_once_t sigev_once = PTHREAD_ONCE_INIT;
static pthread_once_t sigev_once_default = PTHREAD_ONCE_INIT;
@@ -196,7 +197,8 @@
if (sn != NULL) {
sn->sn_value = evp->sigev_value;
sn->sn_func = evp->sigev_notify_function;
- sn->sn_gen = atomic_fetchadd_int(&sigev_generation, 1);
+ sn->sn_gen = atomic_fetch_add_explicit(&sigev_generation, 1,
+ memory_order_relaxed);
sn->sn_type = type;
_pthread_attr_init(&sn->sn_attr);
_pthread_attr_setdetachstate(&sn->sn_attr, PTHREAD_CREATE_DETACHED);
@@ -224,11 +226,11 @@
sigev_id_t id)
{
/*
- * Build a new sigevent, and tell kernel to deliver SIGSERVICE
+ * Build a new sigevent, and tell kernel to deliver SIGLIBRT
* signal to the new thread.
*/
newevp->sigev_notify = SIGEV_THREAD_ID;
- newevp->sigev_signo = SIGSERVICE;
+ newevp->sigev_signo = SIGLIBRT;
newevp->sigev_notify_thread_id = (lwpid_t)sn->sn_tn->tn_lwpid;
newevp->sigev_value.sival_ptr = (void *)id;
}
@@ -279,7 +281,7 @@
LIST_REMOVE(sn, sn_link);
if (--sn->sn_tn->tn_refcount == 0)
- _pthread_kill(sn->sn_tn->tn_thread, SIGSERVICE);
+ _pthread_kill(sn->sn_tn->tn_thread, SIGLIBRT);
if (sn->sn_flags & SNF_WORKING)
sn->sn_flags |= SNF_REMOVED;
else
@@ -326,7 +328,7 @@
LIST_INSERT_HEAD(&sigev_threads, tn, tn_link);
__sigev_list_unlock();
- sigfillset(&set); /* SIGSERVICE is masked. */
+ sigfillset(&set); /* SIGLIBRT is masked. */
sigdelset(&set, SIGBUS);
sigdelset(&set, SIGILL);
sigdelset(&set, SIGFPE);
@@ -378,7 +380,7 @@
__sigev_list_unlock();
sigemptyset(&set);
- sigaddset(&set, SIGSERVICE);
+ sigaddset(&set, SIGLIBRT);
for (;;) {
ret = sigwaitinfo(&set, &si);
Modified: trunk/lib/librt/sigev_thread.h
===================================================================
--- trunk/lib/librt/sigev_thread.h 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/sigev_thread.h 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 2005 David Xu <davidxu at freebsd.org>
* All rights reserved.
@@ -23,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/librt/sigev_thread.h 233519 2012-03-26 19:12:09Z rmh $
*
*/
@@ -67,8 +68,6 @@
#define SNF_REMOVED 0x02
#define SNF_SYNC 0x04
-#define SIGSERVICE (SIGTHR+1)
-
int __sigev_check_init();
struct sigev_node *__sigev_alloc(int, const struct sigevent *,
struct sigev_node *, int);
Added: trunk/lib/librt/tests/Makefile
===================================================================
--- trunk/lib/librt/tests/Makefile (rev 0)
+++ trunk/lib/librt/tests/Makefile 2018-06-09 19:19:57 UTC (rev 10649)
@@ -0,0 +1,12 @@
+# $MidnightBSD$
+# $FreeBSD: stable/10/lib/librt/tests/Makefile 313488 2017-02-09 22:49:48Z ngie $
+
+DPADD+= ${LIBRT}
+LDADD+= -lrt
+
+NETBSD_ATF_TESTS_C= sched_test
+NETBSD_ATF_TESTS_C+= sem_test
+
+.include <netbsd-tests.test.mk>
+
+.include <bsd.test.mk>
Property changes on: trunk/lib/librt/tests/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/lib/librt/timer.c
===================================================================
--- trunk/lib/librt/timer.c 2018-06-09 19:19:03 UTC (rev 10648)
+++ trunk/lib/librt/timer.c 2018-06-09 19:19:57 UTC (rev 10649)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 2006 David Xu <davidxu at freebsd.org>
* All rights reserved.
@@ -23,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/lib/librt/timer.c 227661 2011-11-18 09:56:40Z kib $
*
*/
More information about the Midnightbsd-cvs
mailing list