aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/head/synch.h
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2011-02-27 19:41:40 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2011-02-27 19:41:40 +0000
commit10b9d77bf1ccf2f3affafa6261692cb92cf7e992 (patch)
treeef515cadc08bf427e4d3f1360199ec9827b1596b /cddl/contrib/opensolaris/head/synch.h
parente02dd14a548a89bee6657d9eacb0f992bf61b280 (diff)
downloadsrc-10b9d77bf1ccf2f3affafa6261692cb92cf7e992.tar.gz
src-10b9d77bf1ccf2f3affafa6261692cb92cf7e992.zip
Finally... Import the latest open-source ZFS version - (SPA) 28.
Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month
Notes
Notes: svn path=/head/; revision=219089
Diffstat (limited to 'cddl/contrib/opensolaris/head/synch.h')
-rw-r--r--cddl/contrib/opensolaris/head/synch.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/cddl/contrib/opensolaris/head/synch.h b/cddl/contrib/opensolaris/head/synch.h
index eab9de86a534..89efe9c687ac 100644
--- a/cddl/contrib/opensolaris/head/synch.h
+++ b/cddl/contrib/opensolaris/head/synch.h
@@ -20,15 +20,12 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _SYNCH_H
#define _SYNCH_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* synch.h:
* definitions needed to use the thread synchronization interface
@@ -243,10 +240,17 @@ int sema_trywait();
#ifdef __STDC__
-int _sema_held(sema_t *);
-int _rw_read_held(rwlock_t *);
-int _rw_write_held(rwlock_t *);
-int _mutex_held(mutex_t *);
+/*
+ * The *_held() functions apply equally well to Solaris threads
+ * and to Posix threads synchronization objects, but the formal
+ * type declarations are different, so we just declare the argument
+ * to each *_held() function to be a void *, expecting that they will
+ * be called with the proper type of argument in each case.
+ */
+int _sema_held(void *); /* sema_t or sem_t */
+int _rw_read_held(void *); /* rwlock_t or pthread_rwlock_t */
+int _rw_write_held(void *); /* rwlock_t or pthread_rwlock_t */
+int _mutex_held(void *); /* mutex_t or pthread_mutex_t */
#else /* __STDC__ */
@@ -257,6 +261,13 @@ int _mutex_held();
#endif /* __STDC__ */
+/* Pause API */
+#ifdef __STDC__
+void smt_pause(void);
+#else /* __STDC__ */
+void smt_pause();
+#endif /* __STDC__ */
+
#endif /* _ASM */
#ifdef __cplusplus