summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rw-r--r--usr/src/uts/common/brand/lx/os/lx_brand.c8
-rw-r--r--usr/src/uts/common/brand/lx/sys/lx_impl.h5
-rw-r--r--usr/src/uts/common/brand/lx/syscall/lx_futex.c9
3 files changed, 18 insertions, 4 deletions
diff --git a/usr/src/uts/common/brand/lx/os/lx_brand.c b/usr/src/uts/common/brand/lx/os/lx_brand.c
index 972f76431e..76e781159a 100644
--- a/usr/src/uts/common/brand/lx/os/lx_brand.c
+++ b/usr/src/uts/common/brand/lx/os/lx_brand.c
@@ -515,6 +515,12 @@ lx_free_brand_data(zone_t *zone)
kmem_free(zone->zone_brand_data, sizeof (lx_zone_data_t));
}
+void
+lx_unsupported(char *dmsg)
+{
+ DTRACE_PROBE1(brand__lx__unsupported, char *, dmsg);
+}
+
/*
* Get the addresses of the user-space system call handler and attach it to
* the proc structure. Returning 0 indicates success; the value returned
@@ -762,7 +768,7 @@ lx_brandsys(int cmd, int64_t *rval, uintptr_t arg1, uintptr_t arg2,
return (EFAULT);
}
dmsg[255] = '\0';
- DTRACE_PROBE1(brand__lx__unsupported, char *, dmsg);
+ lx_unsupported(dmsg);
}
return (0);
diff --git a/usr/src/uts/common/brand/lx/sys/lx_impl.h b/usr/src/uts/common/brand/lx/sys/lx_impl.h
index 12f1aab2b3..81fa6227f1 100644
--- a/usr/src/uts/common/brand/lx/sys/lx_impl.h
+++ b/usr/src/uts/common/brand/lx/sys/lx_impl.h
@@ -21,13 +21,12 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright 2014 Joyent, Inc. All rights reserved.
*/
#ifndef _LX_IMPL_H
#define _LX_IMPL_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#ifdef __cplusplus
@@ -55,6 +54,8 @@ extern lx_systrace_f *lx_systrace_return_ptr;
extern void lx_brand_systrace_enable(void);
extern void lx_brand_systrace_disable(void);
+extern void lx_unsupported(char *);
+
#ifdef __cplusplus
}
#endif
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_futex.c b/usr/src/uts/common/brand/lx/syscall/lx_futex.c
index 428f6b01f0..3abeb4332e 100644
--- a/usr/src/uts/common/brand/lx/syscall/lx_futex.c
+++ b/usr/src/uts/common/brand/lx/syscall/lx_futex.c
@@ -39,7 +39,9 @@
#include <sys/timer.h>
#include <sys/condvar.h>
#include <sys/inttypes.h>
+#include <sys/cmn_err.h>
#include <sys/lx_futex.h>
+#include <sys/lx_impl.h>
/*
* Futexes are a Linux-specific implementation of inter-process mutexes.
@@ -274,7 +276,7 @@ futex_wait(memid_t *memid, caddr_t addr, int val, timespec_t *timeout)
err = 0;
while ((fw.fw_woken == 0) && (err == 0)) {
ret = cv_waituntil_sig(&fw.fw_cv, &futex_hash_lock[index],
- timeout, timechanged);
+ timeout, timechanged);
if (ret < 0)
err = set_errno(ETIMEDOUT);
else if (ret == 0)
@@ -597,6 +599,7 @@ lx_futex(uintptr_t addr, int op, int val, uintptr_t lx_timeout,
int rval = 0;
int cmd = op & FUTEX_CMD_MASK;
int private = op & FUTEX_PRIVATE_FLAG;
+ char dmsg[32];
/* must be aligned on int boundary */
if (addr & 0x3)
@@ -612,6 +615,8 @@ lx_futex(uintptr_t addr, int op, int val, uintptr_t lx_timeout,
* semantics against humanity; it has been ripped out of Linux
* and will never be supported by us.
*/
+ (void) snprintf(dmsg, sizeof (dmsg), "futex 0x%x", cmd);
+ lx_unsupported(dmsg);
return (set_errno(ENOSYS));
}
@@ -629,6 +634,8 @@ lx_futex(uintptr_t addr, int op, int val, uintptr_t lx_timeout,
* deal with these being missing -- but if and as that changes,
* they may well need to be implemented.
*/
+ (void) snprintf(dmsg, sizeof (dmsg), "futex 0x%x", cmd);
+ lx_unsupported(dmsg);
return (set_errno(ENOSYS));
}