Files
vxWorks/h/shlLibCommon.h
2025-08-20 18:25:46 +08:00

72 lines
1.8 KiB
C

/* shlLibCommon.h - common shared library support library header file */
/* Copyright 2004 Wind River Systems, Inc. */
/*
modification history
--------------------
01c,05nov04,kk added S_shlLib_SHL_ACCESS_DENIED
01b,20apr04,pad Added errno S_shlLib_INVALID_PARAMETER.
01a,26mar04,dms created based on sdLibCommon.h
*/
#ifndef __INCshlLibCommonh
#define __INCshlLibCommonh
#include "vxWorks.h"
#include "vwModNum.h"
/* errno values */
#define S_shlLib_ID_SPACE_EXHAUSTED (M_shlLib | 1)
#define S_shlLib_INVALID_SH_INITFLG_CHANGE (M_shlLib | 2)
#define S_shlLib_INVALID_GOTT_INDEX (M_shlLib | 3)
#define S_shlLib_INVALID_SHL_ID (M_shlLib | 4)
#define S_shlLib_INVALID_PARAMETER (M_shlLib | 5)
#define S_shlLib_SHL_ACCESS_DENIED (M_shlLib | 6)
/* data structures */
typedef struct
{
UINT32 shlFlags;
int shlGOTTINDEX; /* unique small integer ID */
VIRT_ADDR shlTextBase; /* address of shared library text segment */
size_t shlTextSize; /* size of shared library text segment */
VIRT_ADDR shlDataBase; /* address of shared library data in the RTP */
size_t shlDataSize; /* size of shared library data segment */
} SHLINFO;
/* options */
/* Set in shlFlags to indicate that the library has been initialized. */
#define SHL_INITFLG 0x00000001
/* This is a system-wide limit on the number of shared objects. */
#define MAX_SHARED_OBJECTS 1023
#ifdef __cplusplus
extern "C" {
#endif
/* functional API to the library */
SHL_ID _shlOpen (const char * name,
int options);
void _shlUnlock (SHL_ID shlId);
STATUS _shlGet (SHL_ID shlId,
SHLINFO * info);
STATUS _shlPut (SHL_ID shlId,
const SHLINFO * info);
STATUS _shlClose (SHL_ID shlId);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __INCshlLibCommonh */