void vc_hostfs_init(void) { // This hostfs module is not thread safe - it allocaes a block // of memory and uses it without any kind of locking. // // It offers no advantage of stdio, and so most clients should // not use it. Arguably FILESYS should use it in order to get // the FIFO support. const char *thread_name = vcos_thread_get_name(vcos_thread_current()); if (strcmp(thread_name, "FILESYS") != 0 && strcmp(thread_name, "HFilesys") != 0) { fprintf(stderr,"%s: vc_hostfs is deprecated. Please use stdio\n", vcos_thread_get_name(vcos_thread_current())); } vcos_log_register("hostfs", &hostfs_log_cat); DEBUG_MINOR("init"); // Allocate memory for the file info table p_file_info_table = (file_info_t *)calloc( FILE_INFO_TABLE_CHUNK_LEN, sizeof( file_info_t ) ); assert( p_file_info_table != NULL ); if (p_file_info_table) { file_info_table_len = FILE_INFO_TABLE_CHUNK_LEN; } }
static void pool_object_logging( const char *fname, VC_POOL_OBJECT_T *object ) { logging_message( LOGGING_VMCS,"%s: %p: task %s: refcount=%d", fname, object, vcos_thread_get_name( vcos_thread_current() ), object->refcount ); }