Re: [squid-users] In store.c

From: Colin Campbell <sgcccdc@dont-contact.us>
Date: Tue, 14 Aug 2001 08:57:39 +1000 (EST)

Hi,

On Mon, 13 Aug 2001, mani wrote:

> Hello All,
>
> storeReleaseRequest(StoreEntry * e) this is the function which
> comes under store.c, It contains some of prdefined macro's.
>
> EBIT_TEST(e->flags, RELEASE_REQUEST)
> EBIT_SET(e->flags, RELEASE_REQUEST)
> EBIT_CLR(e->flags, ENTRY_CACHABLE)
>
> What these macro's do? ( I want to know, what is happenning in the each time these macro's get excecuted)

A quick scan of the source files shows defines.h contains:

#define EBIT_SET(flag, bit) ((void)((flag) |= ((1L<<(bit)))))
#define EBIT_CLR(flag, bit) ((void)((flag) &= ~((1L<<(bit)))))
#define EBIT_TEST(flag, bit) ((flag) & ((1L<<(bit))))

At a rough guess I'd say they "test", "set" and "clear" the appropriate
flags for the StoreEntry pointed to by "e". I am actually hoping you knew
that already though.

Other than that the function storeReleaseRequest seems to be called to
mark an object to not be cached as follows:

        if the object is already marked for release, return.
        # since not already marked
        mark it to be released,
        mark it not cachable
        set the private key on the object

Colin

--
Colin Campbell
Unix Support/Postmaster/Hostmaster
CITEC
+61 7 3006 4710
Received on Mon Aug 13 2001 - 16:58:06 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:36 MST