X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdevices%2Fintq.c;fp=src%2Fdevices%2Fintq.c;h=40b23ae6a48fe5bd0dfd3d1ed65b9ad97c31c505;hb=8fff557107b6a3efec0000ce98904450c1de3648;hp=028dca4272aee56836c64a68974e8cd4bf4ef5a4;hpb=e81af6fff9570e6f3f2b13bb9ad54cc17f25aa50;p=pintos-anon diff --git a/src/devices/intq.c b/src/devices/intq.c index 028dca4..40b23ae 100644 --- a/src/devices/intq.c +++ b/src/devices/intq.c @@ -32,9 +32,8 @@ intq_full (const struct intq *q) } /* Removes a byte from Q and returns it. - Q must not be empty if called from an interrupt handler. - Otherwise, if Q is empty, first sleeps until a byte is - added. */ + If Q is empty, sleeps until a byte is added. + When called from an interrupt handler, Q must not be empty. */ uint8_t intq_getc (struct intq *q) { @@ -56,9 +55,8 @@ intq_getc (struct intq *q) } /* Adds BYTE to the end of Q. - Q must not be full if called from an interrupt handler. - Otherwise, if Q is full, first sleeps until a byte is - removed. */ + If Q is full, sleeps until a byte is removed. + When called from an interrupt handler, Q must not be full. */ void intq_putc (struct intq *q, uint8_t byte) {