- Main Page
- Namespaces
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# device.h File Reference

`#include <ubixos/types.h>`

Go to the source code of this file.

## Data Structures
struct | device_interface
struct | device_node
struct | device_resource
## Functions
int | device_add (int, char, struct device_interface *)
device_node * | device_find (int major, int minor)
int | device_remove (struct device_node *)

## Function Documentation

int device_add | ( | int | ,
|  | char | ,
|  | struct device_interface * |  |
| ) |  |  |

Definition at line 51 of file device.c.

References devices, deviceSpinLock, device_node::devInfo, device_interface::init, device_interface::initialized, kmalloc(), kprintf(), device_node::minor, device_node::next, NULL, device_node::prev, spinLock(), spinUnlock(), and device_node::type.

Referenced by fdc_init(), and initHardDisk().

struct device_node* device_find | ( | int | major,
|  | int | minor |
| ) |  |  |

Definition at line 86 of file device.c.

References devices, deviceSpinLock, device_node::devInfo, device_interface::major, device_node::minor, device_node::next, spinLock(), and spinUnlock().

Referenced by devfs_open(), devfs_read(), devfs_write(), and vfs_mount().

int device_remove | ( | struct device_node * |  | ) |

Definition at line 110 of file device.c.

References devices, deviceSpinLock, kfree(), device_node::next, NULL, spinLock(), and spinUnlock().