aboutsummaryrefslogtreecommitdiff
path: root/include/venti.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-02-11 20:32:41 +0000
committerrsc <devnull@localhost>2005-02-11 20:32:41 +0000
commit6c0209f6f0eb41151397e4784730d2b6bca8d7ea (patch)
tree12a915fa08bf4f333bbad34f03347d4444729c07 /include/venti.h
parent7d59ed711467b2b2c8ac25f86724225c8be7524c (diff)
downloadplan9port-6c0209f6f0eb41151397e4784730d2b6bca8d7ea.tar.gz
plan9port-6c0209f6f0eb41151397e4784730d2b6bca8d7ea.tar.bz2
plan9port-6c0209f6f0eb41151397e4784730d2b6bca8d7ea.zip
build changes
Diffstat (limited to 'include/venti.h')
-rw-r--r--include/venti.h41
1 files changed, 36 insertions, 5 deletions
diff --git a/include/venti.h b/include/venti.h
index 7b14c1ae..ed50d680 100644
--- a/include/venti.h
+++ b/include/venti.h
@@ -4,6 +4,11 @@
extern "C" {
#endif
+#ifndef PLAN9PORT
+#pragma lib "libventi.a"
+#pragma src "/sys/src/libventi"
+#endif
+
AUTOLIB(venti)
/* XXX should be own library? */
@@ -38,12 +43,38 @@ int packetcmp(Packet*, Packet*);
void packetstats(void);
void packetsha1(Packet*, uchar sha1[20]);
-/* XXX begin actual venti.h */
+/* XXX should be own library? */
+/*
+ * Logging
+ */
+typedef struct VtLog VtLog;
+typedef struct VtLogChunk VtLogChunk;
-#ifndef PLAN9PORT
-#pragma lib "libventi.a"
-#pragma src "/sys/src/libventi"
-#endif
+struct VtLog
+{
+ VtLog *next; /* in hash table */
+ VtLogChunk *chunk;
+ uint nchunk;
+ VtLogChunk *w;
+ QLock lk;
+ int ref;
+};
+
+struct VtLogchunk
+{
+ char *buf;
+ uint nbuf;
+ char *w;
+};
+
+VtLog *vtlogopen(char *name, uint size);
+void vtlogprint(VtLog *log, char *fmt, ...);
+void vtlog(char *name, char *fmt, ...);
+void vtlogclose(char *name);
+void vtlogremove(char *name);
+int vtlogdump(int fd, VtLog*);
+
+/* XXX begin actual venti.h */
typedef struct VtFcall VtFcall;
typedef struct VtConn VtConn;