Permalink
Browse files

_lwp: add _sched_protect()

Used by recent NetBSD libpthread.
  • Loading branch information...
1 parent 0b2b958 commit 8b704b69ce5c46afef98d71ed8cc482db0d5d173 @anttikantee anttikantee committed Jul 28, 2016
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/librumprun_base/_lwp.c
@@ -361,6 +361,9 @@ _lwp_getprivate(void)
void _lwpnullop(void);
void _lwpnullop(void) { }
+int _lwpsuccess(void);
+int _lwpsuccess(void) { return 0; }
+
void _lwpabort(void);
void __dead
_lwpabort(void)
@@ -386,3 +389,9 @@ __strong_alias(_sched_getaffinity,_lwpnullop);
__strong_alias(_sched_getparam,_lwpnullop);
__strong_alias(_sched_setaffinity,_lwpnullop);
__strong_alias(_sched_setparam,_lwpnullop);
+
+/*
+ * Technically, specifying a lower >0 protection level is an error,
+ * but we don't flag that error for now.
+ */
+__strong_alias(_sched_protect,_lwpsuccess);

0 comments on commit 8b704b6

Please sign in to comment.