-void
-tws_hash_ws_flush(tws_hash_t tws) {
- tws_startup_t scache;
- if(tws == NULL) {
- return;
- }
- tws_lock(tws);
- if(tws->startup_name != NULL) {
- scache = tws_create_startup_list(tws);
- if(scache == NULL) {
- /* dump the name cache, we'll */
- /* get it next time */
- kfree((vm_offset_t)
- tws->startup_name,
- tws->startup_name_length);
- tws->startup_name = NULL;
- tws_unlock(tws);
- return;
- }
- bsd_write_page_cache_file(tws->uid, tws->startup_name,
- scache, scache->tws_hash_size,
- tws->mod, tws->fid);
- kfree((vm_offset_t)scache,
- scache->tws_hash_size);
- kfree((vm_offset_t)
- tws->startup_name,
- tws->startup_name_length);
- tws->startup_name = NULL;
- }
- tws_unlock(tws);
- return;
-}
-