void DevFS_DelDevice(tDevFS_Driver *Device);
tVFS_Node *DevFS_InitDevice(char *Device, char **Options);
char *DevFS_ReadDir(tVFS_Node *Node, int Pos);
-tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name);
+tVFS_Node *DevFS_FindDir(tVFS_Node *Node, const char *Name);
// === GLOBALS ===
tVFS_Driver gDevFS_Info = {
};
tDevFS_Driver *gDevFS_Drivers = NULL;
int giDevFS_NextID = 1;
-tSpinlock glDevFS_ListLock;
+tShortSpinlock glDevFS_ListLock;
// === CODE ===
/**
int ret = 0;
tDevFS_Driver *dev;
- LOCK( &glDevFS_ListLock );
+ SHORTLOCK( &glDevFS_ListLock );
// Check if the device is already registered or the name is taken
for( dev = gDevFS_Drivers; dev; dev = dev->Next )
gDevFS_RootNode.Size ++;
ret = giDevFS_NextID ++;
}
- RELEASE( &glDevFS_ListLock );
+ SHORTREL( &glDevFS_ListLock );
return ret;
}
{
tDevFS_Driver *prev = NULL, *dev;
- LOCK( &glDevFS_ListLock );
+ SHORTLOCK( &glDevFS_ListLock );
// Search list for device
for(dev = gDevFS_Drivers;
dev && dev != Device;
Log_Warning("DevFS", "Attempted to unregister device %p '%s' which was not registered",
Device, Device->Name);
- RELEASE( &glDevFS_ListLock );
+ SHORTREL( &glDevFS_ListLock );
}
/**
}
/**
- * \fn tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name)
+ * \fn tVFS_Node *DevFS_FindDir(tVFS_Node *Node, const char *Name)
* \brief Get an entry from the devices directory
*/
-tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name)
+tVFS_Node *DevFS_FindDir(tVFS_Node *Node, const char *Name)
{
tDevFS_Driver *dev;