src/core/koa.h

Go to the documentation of this file.
00001 
00008 #ifndef _TXC_KOA_H
00009 #define _TXC_KOA_H
00010 
00011 #include <misc/result.h>
00012 #include <core/sentinel.h>
00013 #include <core/buffer.h>
00014 #include <sys/stat.h>
00015 
00016 
00017 #define TXC_KOA_INVALID                     -1 
00018 #define TXC_KOA_IS_SOCK_DGRAM               1  
00019 #define TXC_KOA_IS_SOCK_STREAM              2  
00020 #define TXC_KOA_IS_PIPE_READ_END            3  
00021 #define TXC_KOA_IS_PIPE_WRITE_END           4  
00022 #define TXC_KOA_IS_FILE                     5  
00024 typedef struct txc_koa_s txc_koa_t;
00025 typedef struct txc_koamgr_s txc_koamgr_t;
00026 
00027 extern txc_koamgr_t *txc_g_koamgr;
00028 
00029 txc_result_t txc_koamgr_create(txc_koamgr_t **, txc_sentinelmgr_t *, txc_buffermgr_t *); 
00030 void txc_koamgr_destroy(txc_koamgr_t **);
00031 txc_result_t txc_koa_create(txc_koamgr_t *, txc_koa_t **, int, void *);
00032 void txc_koa_destroy(txc_koa_t **);
00033 txc_result_t txc_koa_path2inode(const char *, ino_t *); 
00034 txc_result_t txc_koa_attach(txc_koa_t *);
00035 txc_result_t txc_koa_detach(txc_koa_t *);
00036 txc_result_t txc_koa_attach_fd(txc_koa_t *koa, int fd, int lock);
00037 txc_result_t txc_koa_detach_fd(txc_koa_t *koa, int fd, int lock);
00038 txc_result_t txc_koa_lock_alias_cache(txc_koamgr_t *koamgr);
00039 txc_result_t txc_koa_unlock_alias_cache(txc_koamgr_t *koamgr);
00040 txc_result_t txc_koa_lookup_fd2koa(txc_koamgr_t *, int, txc_koa_t **);
00041 txc_result_t txc_koa_alias_cache_lookup_inode(txc_koamgr_t *koamgr, ino_t inode_number, txc_koa_t **koap);
00042 txc_result_t txc_koa_lock_fd(txc_koamgr_t *koamgr, int fd);
00043 txc_result_t txc_koa_unlock_fd(txc_koamgr_t *koamgr, int fd);
00044 txc_result_t txc_koa_lock_fds_refby_koa(txc_koa_t *koa);
00045 txc_result_t txc_koa_unlock_fds_refby_koa(txc_koa_t *koa);
00046 txc_sentinel_t *txc_koa_get_sentinel(txc_koa_t *koa);
00047 txc_koamgr_t *txc_koa_get_koamgr(txc_koa_t *koa);
00048 void *txc_koa_get_buffer(txc_koa_t *koa);
00049 
00050 #endif /* _TXC_KOA_H */

Generated on Wed Dec 9 20:32:39 2009 for xCalls by  doxygen 1.4.7