Graphviz 12.1.0~dev.20240716.0947
Loading...
Searching...
No Matches
tclhandle.h File Reference
#include <stdint.h>
#include <tcl.h>
Include dependency graph for tclhandle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tblHeader_t
 
struct  entryHeader_t
 

Macros

#define ROUND_ENTRY_SIZE(size)
 
#define NULL_IDX   UINT64_MAX
 
#define ALLOCATED_IDX   (UINT64_MAX - 1)
 
#define ENTRY_HEADER_SIZE   (ROUND_ENTRY_SIZE(sizeof(entryHeader_t)))
 
#define TBL_INDEX(hdrPtr, idx)    ((entryHeader_pt)(hdrPtr->bodyPtr + (hdrPtr->entrySize * idx)))
 
#define USER_AREA(entryPtr)   (void *)(((ubyte_pt)entryPtr) + ENTRY_HEADER_SIZE);
 
#define HEADER_AREA(entryPtr)    (entryHeader_pt)(((ubyte_pt)entryPtr) - ENTRY_HEADER_SIZE);
 

Typedefs

typedef unsigned char ubyte_t
 
typedef ubyte_tubyte_pt
 
typedef tblHeader_ttblHeader_pt
 
typedef entryHeader_tentryHeader_pt
 

Functions

void * tclhandleFreeIndex (tblHeader_pt headerPtr, uint64_t entryIdx)
 
void * tclhandleFree (tblHeader_pt headerPtr, char *handle)
 
tblHeader_pt tclhandleInit (char *prefix, uint64_t entrySize, uint64_t initEntries)
 
void * tclhandleXlateIndex (tblHeader_pt headerPtr, uint64_t entryIdx)
 
void * tclhandleXlate (tblHeader_pt headerPtr, char *handle)
 
entryHeader_pt tclhandleAlloc (tblHeader_pt tblHdrPtr, char **handle, uint64_t *entryIdxPtr)
 
int tclhandleIndex (tblHeader_pt tblHdrPtr, char *handle, uint64_t *entryIdxPtr)
 

Macro Definition Documentation

◆ ALLOCATED_IDX

#define ALLOCATED_IDX   (UINT64_MAX - 1)

Definition at line 27 of file tclhandle.h.

◆ ENTRY_HEADER_SIZE

#define ENTRY_HEADER_SIZE   (ROUND_ENTRY_SIZE(sizeof(entryHeader_t)))

Definition at line 56 of file tclhandle.h.

◆ HEADER_AREA

#define HEADER_AREA (   entryPtr)     (entryHeader_pt)(((ubyte_pt)entryPtr) - ENTRY_HEADER_SIZE);

Definition at line 69 of file tclhandle.h.

◆ NULL_IDX

#define NULL_IDX   UINT64_MAX

Definition at line 26 of file tclhandle.h.

◆ ROUND_ENTRY_SIZE

#define ROUND_ENTRY_SIZE (   size)
Value:
((((size) + tclhandleEntryAlignment - 1) / tclhandleEntryAlignment) * \
tclhandleEntryAlignment)

Definition at line 22 of file tclhandle.h.

◆ TBL_INDEX

#define TBL_INDEX (   hdrPtr,
  idx 
)     ((entryHeader_pt)(hdrPtr->bodyPtr + (hdrPtr->entrySize * idx)))

Definition at line 61 of file tclhandle.h.

◆ USER_AREA

#define USER_AREA (   entryPtr)    (void *)(((ubyte_pt)entryPtr) + ENTRY_HEADER_SIZE);

Definition at line 68 of file tclhandle.h.

Typedef Documentation

◆ entryHeader_pt

Definition at line 54 of file tclhandle.h.

◆ tblHeader_pt

Definition at line 49 of file tclhandle.h.

◆ ubyte_pt

typedef ubyte_t* ubyte_pt

Definition at line 30 of file tclhandle.h.

◆ ubyte_t

typedef unsigned char ubyte_t

Definition at line 29 of file tclhandle.h.

Function Documentation

◆ tclhandleAlloc()

entryHeader_pt tclhandleAlloc ( tblHeader_pt  tblHdrPtr,
char **  handle,
uint64_t *  entryIdxPtr 
)

Definition at line 123 of file tclhandle.c.

References agxbdisown(), agxbprint(), ALLOCATED_IDX, tblHeader_t::freeHeadIdx, entryHeader_t::freeLink, tblHeader_t::handleFormat, NULL_IDX, TBL_INDEX, tclhandleExpandTable(), and USER_AREA.

Referenced by vgpane().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tclhandleFree()

void * tclhandleFree ( tblHeader_pt  headerPtr,
char *  handle 
)

Definition at line 293 of file tclhandle.c.

References NULL, tclhandleFreeIndex(), and tclhandleIndex().

Referenced by vgpanecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tclhandleFreeIndex()

void * tclhandleFreeIndex ( tblHeader_pt  headerPtr,
uint64_t  entryIdx 
)

Definition at line 261 of file tclhandle.c.

References ALLOCATED_IDX, tblHeader_t::bodyPtr, tblHeader_t::entrySize, tblHeader_t::freeHeadIdx, entryHeader_t::freeLink, HEADER_AREA, NULL, tblHeader_t::tableSize, TBL_INDEX, and USER_AREA.

Referenced by tclhandleFree().

Here is the caller graph for this function:

◆ tclhandleIndex()

int tclhandleIndex ( tblHeader_pt  tblHdrPtr,
char *  handle,
uint64_t *  entryIdxPtr 
)

Definition at line 195 of file tclhandle.c.

References tblHeader_t::handleFormat.

Referenced by tclhandleFree(), and tclhandleXlate().

Here is the caller graph for this function:

◆ tclhandleInit()

tblHeader_pt tclhandleInit ( char *  prefix,
uint64_t  entrySize,
uint64_t  initEntries 
)

Definition at line 158 of file tclhandle.c.

References tblHeader_t::bodyPtr, ENTRY_HEADER_SIZE, tblHeader_t::entrySize, tblHeader_t::freeHeadIdx, tblHeader_t::handleFormat, malloc(), NULL_IDX, prefix, ROUND_ENTRY_SIZE, tblHeader_t::tableSize, and tclhandleLinkInNewEntries().

Referenced by Tclpathplan_Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tclhandleXlate()

void * tclhandleXlate ( tblHeader_pt  headerPtr,
char *  handle 
)

Definition at line 241 of file tclhandle.c.

References NULL, tclhandleIndex(), and tclhandleXlateIndex().

Referenced by vgpanecmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tclhandleXlateIndex()

void * tclhandleXlateIndex ( tblHeader_pt  headerPtr,
uint64_t  entryIdx 
)

Definition at line 217 of file tclhandle.c.

References ALLOCATED_IDX, entryHeader_t::freeLink, NULL, tblHeader_t::tableSize, TBL_INDEX, and USER_AREA.

Referenced by tclhandleXlate().

Here is the caller graph for this function: