Rev 575 | Rev 990 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 575 | Rev 588 | ||
|---|---|---|---|
| Line 60... | Line 60... | ||
| 60 | if (chardev->counter == CHARDEV_BUFLEN - 1) { |
60 | if (chardev->counter == CHARDEV_BUFLEN - 1) { |
| 61 | /* buffer full => disable device interrupt */ |
61 | /* buffer full => disable device interrupt */ |
| 62 | chardev->op->suspend(chardev); |
62 | chardev->op->suspend(chardev); |
| 63 | } |
63 | } |
| 64 | 64 | ||
| 65 | putchar(ch); |
- | |
| 66 | chardev->buffer[chardev->index++] = ch; |
65 | chardev->buffer[chardev->index++] = ch; |
| 67 | chardev->index = chardev->index % CHARDEV_BUFLEN; /* index modulo size of buffer */ |
66 | chardev->index = chardev->index % CHARDEV_BUFLEN; /* index modulo size of buffer */ |
| 68 | waitq_wakeup(&chardev->wq, WAKEUP_FIRST); |
67 | waitq_wakeup(&chardev->wq, WAKEUP_FIRST); |
| 69 | spinlock_unlock(&chardev->lock); |
68 | spinlock_unlock(&chardev->lock); |
| 70 | } |
69 | } |