Previous: , Up: Reference Tracker Functions   [Index]


12.1.1.4 x1f4_post_lxfset

extern int x1f4_post_lxfset
    (void *fset, void **seek, void ***post);

The x1f4_post_lxfset function searches the fset map for some pointer pair matching the pointer stored at seek. Upon look up success, the address of the found pointer pair is stored at post. Upon look up failure, inserts a pointer pair, corresponding the pointer stored at seek and stores the start address of the pointer pair data at post. The newly inserted pointer pair needs to be set once the function has returned.

The function returns 0 if a new element was inserted, X1f4_LXFSET_EVER_MATCH if a match was found, a different value for failure.

Usage hint:

    void **result, *search;

    ...

    /* look for a pointer pair matching _search_ */
    if (x1f4_post_lxfset(fset, &search, &result)) {
    } else {
	/* none found, _result_ points an unset pointer pair
	 */
	result[0] = search;
	result[1] = ...;
    }