src/kernel/fs/fat32.c
/*!
 * @note get the entry`s read lock and let ref cnt increase.
 * @warning for the target entry,don`t hold any lock before this function invoking.
 * @param entry
 * @return
 */
@note get the entry`s read lock and let ref cnt increase.
@warning for the target entry,don`t hold any lock before this function invoking.
@param entry
@return
@note get the entry ` s read lock and let ref cnt increase . @warning for the target entry don ` t hold any lock before this function invoking . @param entry @return
entry_t * entry_get_read(entry_t * entry){
    fs_stub_rw_w_lock_acquire(&entry->rw_lock);
    entry->ref_cnt++;
    fs_stub_rw_w_lock_release(&entry->rw_lock);
    fs_stub_rw_r_lock_acquire(&entry->rw_lock);
    return entry;
}
entry_t * entry_get_read ( entry_t * entry ) { fs_stub_rw_w_lock_acquire ( & entry -> rw_lock ) ; entry -> ref_cnt ++ ; fs_stub_rw_w_lock_release ( & entry -> rw_lock ) ; fs_stub_rw_r_lock_acquire ( & entry -> rw_lock ) ; return entry ; }
@note get the entry`s read lock and let ref cnt increase.
@note get the entry ` s read lock and let ref cnt increase .
// if the write lock is release here.the ref cnt is not zero, // so the cache of this entry can`t be switch.