10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _PRIV_PRIVATE_H
28 #define _PRIV_PRIVATE_H
29
30 #include <sys/types.h>
31 #include <sys/priv.h>
32 #include <limits.h>
33
34 /*
35 * Libc private privilege data.
36 */
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 #define LOADPRIVDATA(d) d = __priv_getdata()
43 #define GETPRIVDATA() __priv_getdata()
44 #define LOCKPRIVDATA() { \
45 /* Data already allocated */ \
46 (void) lock_data(); \
47 (void) refresh_data(); \
48 }
49 #define UNLOCKPRIVDATA() unlock_data()
|
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _PRIV_PRIVATE_H
28 #define _PRIV_PRIVATE_H
29
30 #pragma ident "%Z%%M% %I% %E% SMI"
31
32 #include <sys/types.h>
33 #include <sys/priv.h>
34 #include <limits.h>
35
36 /*
37 * Libc private privilege data.
38 */
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 #define LOADPRIVDATA(d) d = __priv_getdata()
45 #define GETPRIVDATA() __priv_getdata()
46 #define LOCKPRIVDATA() { \
47 /* Data already allocated */ \
48 (void) lock_data(); \
49 (void) refresh_data(); \
50 }
51 #define UNLOCKPRIVDATA() unlock_data()
|