Rev 534 | Rev 575 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 534 | Rev 552 | ||
|---|---|---|---|
| Line 37... | Line 37... | ||
| 37 | * @param op Implementation of character device operations. |
37 | * @param op Implementation of character device operations. |
| 38 | */ |
38 | */ |
| 39 | void chardev_initialize(chardev_t *chardev, chardev_operations_t *op) |
39 | void chardev_initialize(chardev_t *chardev, chardev_operations_t *op) |
| 40 | { |
40 | { |
| 41 | waitq_initialize(&chardev->wq); |
41 | waitq_initialize(&chardev->wq); |
| 42 | spinlock_initialize(&chardev->lock); |
42 | spinlock_initialize(&chardev->lock, "chardev"); |
| 43 | chardev->counter = 0; |
43 | chardev->counter = 0; |
| 44 | chardev->index = 0; |
44 | chardev->index = 0; |
| 45 | chardev->op = op; |
45 | chardev->op = op; |
| 46 | } |
46 | } |
| 47 | 47 | ||