libc_int.h revision 8cd45542f2a452ca0dab13d8b2d5cfa876ccbebc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBC_INT_H
#define _LIBC_INT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
#define CI_NULL 0 /* (void) last entry */
#define CI_MAX 11
#define CI_V_NONE 0 /* ci_version versions */
#define CI_V_TWO 2
#define CI_V_THREE 3
#define CI_V_FOUR 4
#define CI_V_FIVE 5
/*
* Flags for the bindguard routines.
* THR_FLG_NOLOCK and THR_FLG_REENTER are new in version CI_V_FIVE.
*/
/*
* Libc to ld.so.1 interface communication structure.
*/
typedef struct {
int ci_tag;
union {
int (*ci_func)();
long ci_val;
char *ci_ptr;
} ci_un;
} Lc_interface;
/*
* Address range returned via CI_ATEXIT. Note, the address range array passed
*/
typedef struct {
void * lb; /* lower bound */
void * ub; /* upper bound */
/*
* Thread-Local storage data type and interfaces shared between
* libc & ld.so.1.
*/
typedef struct {
unsigned long ti_moduleid; /* module ID for TLS var */
unsigned long ti_tlsoffset; /* offset into tls block for TLS var */
} TLS_index;
typedef struct {
const char *tm_modname; /* name of object */
/* containing TLS */
unsigned long tm_modid; /* TLS module id */
void * tm_tlsblock; /* pointer to r/o init image */
unsigned long tm_filesz; /* initialized file size */
unsigned long tm_memsz; /* memory size */
long tm_stattlsoffset; /* signed offset into static */
/* TLS block */
unsigned long tm_flags;
void * tm_tlsinitarray; /* TLS .init function array */
unsigned long tm_tlsinitarraycnt; /* # of entries in initarray */
void * tm_tlsfiniarray; /* TLS .fini function array */
unsigned long tm_tlsfiniarraycnt; /* # of entries in finiarray */
} TLS_modinfo;
#ifdef _SYSCALL32
typedef struct {
/* containing TLS */
/* TLS block */
#endif
/*
* Flag values for TLS_modifo.tm_flags
*/
#ifdef __cplusplus
}
#endif
#endif /* _LIBC_INT_H */