diff options
Diffstat (limited to 'pcilib/locking.h')
-rw-r--r-- | pcilib/locking.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pcilib/locking.h b/pcilib/locking.h index f7570f6..3727380 100644 --- a/pcilib/locking.h +++ b/pcilib/locking.h @@ -16,8 +16,10 @@ /**size of one lock, determine so the size of the protocol_name in the way locks are registered. 40 bytes are necessary for the mutex structure, so we have a protocol name of length LOCK_SIZE-40*/ #define PCILIB_LOCK_SIZE 128 +/** number of locks per page of kernel memory*/ #define PCILIB_LOCKS_PER_PAGE PCILIB_KMEM_PAGE_SIZE/PCILIB_LOCK_SIZE +/** number of pages allocated for locks in kernel memory*/ #define PCILIB_NUMBER_OF_LOCK_PAGES (PCILIB_MAX_NUMBER_LOCKS*PCILIB_LOCK_SIZE)/PCILIB_KMEM_PAGE_SIZE @@ -38,7 +40,10 @@ void pcilib_clean_all_locks(pcilib_t* ctx); */ int pcilib_init_locking(pcilib_t* ctx, ...); - +/** + * this function destroys all locks and then free the kernel memory allocated for them before + * @param[in] ctx the pcilib_t running + */ void pcilib_free_all_locks(pcilib_t* ctx); #endif /* _LOCK_GLOBAL_ */ |