]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
progress on async-UFS code
authorwessels <>
Thu, 27 May 1999 09:21:37 +0000 (09:21 +0000)
committerwessels <>
Thu, 27 May 1999 09:21:37 +0000 (09:21 +0000)
src/protos.h
src/structs.h
src/tools.cc
src/typedefs.h

index 1bc7f5c34a43d00f5429738f981ef7104a140f86..635cf8ed04ca50f98ff36247a46d5b81566c9f21 100644 (file)
@@ -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);
index a643df88beb131ef8d09fe6388fee116e957bf0b..b676ff0ca9f3706638ddd20aba986efc6bbd5647 100644 (file)
@@ -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;
index 58bba472f8cf6f24d681886a36dabd7711438502..e25935fb883960fe20fec5af4ce32e0eb50a0934 100644 (file)
@@ -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;
+}
index 8a97baf6412830f45744b34ced5e4125fbbf864a..34cc32c56a0c6471ebf8f461bf8ec1d68384ff13 100644 (file)
@@ -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 *);