From 018784958ae6a4e77b23a5ddfe7959123afcadff Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 19 Apr 2012 15:17:58 +0200 Subject: added a first multi-threaded version with a databse pool --- pgsql.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pgsql.h') diff --git a/pgsql.h b/pgsql.h index c5d4b2f..daab34b 100644 --- a/pgsql.h +++ b/pgsql.h @@ -26,6 +26,8 @@ #include /* for Postgresql database access */ +/* --- metadata stored about a file/directory/synlink --- */ + typedef struct PgMeta { size_t size; /* the size of the file */ mode_t mode; /* type and permissions of file/directory */ @@ -37,6 +39,7 @@ typedef struct PgMeta { int ref_count; /* how many open file handles exist for this file */ } PgMeta; +/* --- transaction management and policies --- */ #define PSQL_BEGIN( T ) \ { \ int __res; \ @@ -64,6 +67,8 @@ int psql_commit( PGconn *conn ); int psql_rollback( PGconn *conn ); +/* --- the filesystem functions --- */ + int psql_get_meta( PGconn *conn, const char *path, PgMeta *meta ); int psql_write_meta( PGconn *conn, const int id, const char *path, PgMeta meta ); -- cgit v1.2.3-54-g00ecf