nfs-ganesha 1.4

nfs_tcb.h

Go to the documentation of this file.
00001 #ifndef _NFS_TCB_H__
00002 #define _NFS_TCB_H__
00003 
00004 #include "nfs_core.h"
00005 #include "nlm_list.h"
00006 #include <pthread.h>
00007 
00008 typedef enum thread_sm
00009 {
00010   THREAD_SM_RECHECK,
00011   THREAD_SM_BREAK,
00012   THREAD_SM_EXIT,
00013 } thread_sm_t;
00014 
00015 void tcb_insert(nfs_tcb_t *element);
00016 void tcb_remove(nfs_tcb_t *element);
00017 void tcb_head_init(void);
00018 pause_rc wake_threads(awaken_reason_t reason);
00019 pause_rc pause_threads(pause_reason_t reason);
00020 void notify_threads_of_new_state(void);
00021 void mark_thread_awake(nfs_tcb_t *wcb);
00022 pause_rc mark_thread_existing(nfs_tcb_t *wcb);
00023 void mark_thread_done(nfs_tcb_t *wcb);
00024 void mark_thread_asleep(nfs_tcb_t *wcb);
00025 pause_rc wait_for_threads_to_awaken(void);
00026 void wait_for_threads_to_exit(void);
00027 pause_rc _wait_for_threads_to_pause(void);
00028 int tcb_new(nfs_tcb_t *element, char *name);
00029 thread_sm_t thread_sm_locked(nfs_tcb_t *tcbp);
00030 
00031 #endif
00032