|
KallistiOS
##version##
|
Name manager. More...
Go to the source code of this file.
Data Structures | |
| struct | nmmgr_handler |
| Name handler interface. More... | |
Macros | |
| #define | NMMGR_LIST_INIT { NULL } |
| List entry initializer for static structs. More... | |
| #define | NMMGR_FLAGS_NEEDSFREE 0x00000001 |
| This structure must be freed when removed. More... | |
| #define | NMMGR_TYPE_UNKNOWN 0x0000 /* ? */ |
| Unknown nmmgr type. More... | |
| #define | NMMGR_TYPE_VFS 0x0010 /* Mounted file system */ |
| A mounted filesystem. More... | |
| #define | NMMGR_TYPE_BLOCKDEV 0x0020 /* Block device */ |
| A block device. More... | |
| #define | NMMGR_TYPE_SINGLETON 0x0030 /* Singleton service (e.g., /dev/irq) */ |
| A singleton service (e.g., /dev/irq) More... | |
| #define | NMMGR_TYPE_SYMTAB 0x0040 /* Symbol table */ |
| A symbol table. More... | |
| #define | NMMGR_SYS_MAX 0x10000 /* Here and above are user types */ |
| Everything this and above is a user type. More... | |
Typedefs | |
| typedef struct nmmgr_handler | nmmgr_handler_t |
| Name handler interface. More... | |
Functions | |
| typedef | LIST_HEAD (nmmgr_list, nmmgr_handler) nmmgr_list_t |
| Name handler list type. More... | |
| nmmgr_handler_t * | nmmgr_lookup (const char *name) |
| Retrieve a name handler by name. More... | |
| nmmgr_list_t * | nmmgr_get_list () |
| Get the head element of the name list. More... | |
| int | nmmgr_handler_add (nmmgr_handler_t *hnd) |
| Add a name handler. More... | |
| int | nmmgr_handler_remove (nmmgr_handler_t *hnd) |
| Remove a name handler. More... | |
Name manager.
This file contains the definitions of KOS' name manager. A "name" is a generic identifier for some kind of module. These modules may include services provided by the kernel (such as VFS handlers).
| #define NMMGR_FLAGS_NEEDSFREE 0x00000001 |
This structure must be freed when removed.
| #define NMMGR_LIST_INIT { NULL } |
List entry initializer for static structs.
If you are creating nmmgr handlers, this is what you should initialize the list_ent member with.
| typedef struct nmmgr_handler nmmgr_handler_t |
Name handler interface.
Every name handler must begin its information structures with this header. If the handler conforms to some well-defined interface (such as a VFS), then the struct must more specifically be of that type.
| typedef LIST_HEAD | ( | nmmgr_list | , |
| nmmgr_handler | |||
| ) |
Name handler list type.
Contrary to what doxygen may think, this is not a function.
| nmmgr_list_t* nmmgr_get_list | ( | ) |
Get the head element of the name list.
DO NOT MODIFY THE VALUE RETURNED BY THIS FUNCTION! In fact, don't ever call this function.
| int nmmgr_handler_add | ( | nmmgr_handler_t * | hnd | ) |
Add a name handler.
This function adds a new name handler to the list in the kernel.
| hnd | The handler to add |
| 0 | On success |
| int nmmgr_handler_remove | ( | nmmgr_handler_t * | hnd | ) |
Remove a name handler.
This function removes a name handler from the list in the kernel.
| hnd | The handler to remove |
| 0 | On success |
| -1 | If the handler wasn't found |
| nmmgr_handler_t* nmmgr_lookup | ( | const char * | name | ) |
Retrieve a name handler by name.
This function will retrieve a name handler by its pathname.
| name | The handler to look up |
1.8.7