From: wessels <> Date: Thu, 27 May 1999 09:21:37 +0000 (+0000) Subject: progress on async-UFS code X-Git-Tag: SQUID_3_0_PRE1~2165 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d03d26fbbb6702933179da2f1823a666234eb6d3;p=thirdparty%2Fsquid.git progress on async-UFS code --- diff --git a/src/protos.h b/src/protos.h index 1bc7f5c34a..635cf8ed04 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.336 1999/05/26 20:41:21 wessels Exp $ + * $Id: protos.h,v 1.337 1999/05/27 03:21:37 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1090,6 +1090,8 @@ extern double gb_to_double(const gb_t *); extern const char *gb_to_str(const gb_t *); extern void gb_flush(gb_t *); /* internal, do not use this */ extern int stringHasWhitespace(const char *); +extern void linklistPush(link_list **, void *); +extern void *linklistShift(link_list **); #if USE_HTCP extern void htcpInit(void); diff --git a/src/structs.h b/src/structs.h index a643df88be..b676ff0ca9 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.295 1999/05/26 20:41:24 wessels Exp $ + * $Id: structs.h,v 1.296 1999/05/27 03:21:40 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1320,6 +1320,11 @@ struct _request_flags { unsigned int internal:1; }; +struct _link_list { + void *ptr; + struct _link_list *next; +}; + struct _storeIOState { sfileno swap_file_number; mode_t mode; @@ -1346,10 +1351,12 @@ struct _storeIOState { struct { int fd; const char *read_buf; + link_list *pending_writes; struct { unsigned int close_request:1; unsigned int reading:1; unsigned int writing:1; + unsigned int opening:1; } flags; } aufs; } type; diff --git a/src/tools.cc b/src/tools.cc index 58bba472f8..e25935fb88 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.181 1999/05/26 17:08:05 wessels Exp $ + * $Id: tools.cc,v 1.182 1999/05/27 03:21:42 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -838,3 +838,28 @@ stringHasWhitespace(const char *s) { return (strcspn(s, w_space) != strlen(s)); } + +void +linklistPush(link_list ** L, void *p) +{ + link_list *l = xmalloc(sizeof(*l)); + l->next = NULL; + l->ptr = p; + while (*L) + L = &(*L)->next; + *L = l; +} + +void * +linklistShift(link_list ** L) +{ + void *p; + link_list *l; + if (NULL == *L) + return NULL; + l = *L; + p = l->ptr; + *L = (*L)->next; + xfree(l); + return p; +} diff --git a/src/typedefs.h b/src/typedefs.h index 8a97baf641..34cc32c56a 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.94 1999/05/26 06:48:11 wessels Exp $ + * $Id: typedefs.h,v 1.95 1999/05/27 03:21:43 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -163,6 +163,7 @@ typedef struct _helper_server helper_server; typedef struct _helper_request helper_request; typedef struct _generic_cbdata generic_cbdata; typedef struct _storeIOState storeIOState; +typedef struct _link_list link_list; #if SQUID_SNMP typedef variable_list *(oid_ParseFn) (variable_list *, snint *);