AT driver is not modified (debugging only);

TTY: select and revive with new notify and FS call back;
kernel: removed old notify code; removed ugly prepare_shutdown timer
kputc: don't send to FS if PRINTF_PROC fails
This commit is contained in:
Jorrit Herder
2005-07-27 14:32:16 +00:00
parent 28958cca35
commit fe0dcb5c00
23 changed files with 172 additions and 267 deletions

View File

@@ -34,7 +34,6 @@ int nr;
{
/* The system has run aground of a fatal kernel error. Terminate execution. */
static int panicking = 0;
timer_t *tp;
if (panicking ++) return; /* prevent recursive panics */
if (mess != NULL) {
@@ -43,12 +42,8 @@ int nr;
kprintf("\n",NO_NUM);
}
/* Make a direct call to shutdown. Interface requires to pass the shutdown
* status by means of a timer.
*/
tp = &priv(proc_addr(KERNEL))->s_alarm_timer;
tmr_arg(tp)->ta_int = RBT_PANIC;
prepare_shutdown(tp);
/* Abort MINIX. */
prepare_shutdown(RBT_PANIC);
}
@@ -148,57 +143,3 @@ int c; /* character to append */
}
#if TEMP_CODE
/*===========================================================================*
* free_bit *
*===========================================================================*/
PUBLIC void free_bit(bit_nr, bitmap, nr_bits)
bit_t bit_nr;
bitchunk_t *bitmap;
bit_t nr_bits;
{
bitchunk_t *chunk;
if (bit_nr >= nr_bits) {
kprintf("Warning, free_bit: %d illegal index\n", bit_nr);
return;
}
chunk = &bitmap[(bit_nr/BITCHUNK_BITS)];
*chunk &= ~(1 << (bit_nr % BITCHUNK_BITS));
}
/*===========================================================================*
* alloc_bit *
*===========================================================================*/
PUBLIC int alloc_bit(bitmap, nr_bits)
bitchunk_t *bitmap;
bit_t nr_bits;
{
bitchunk_t *chunk;
int nr_chunks;
int bit_nr;
int i;
/* Iterate over the words in block. */
nr_chunks = BITMAP_CHUNKS(nr_bits);
for (chunk = &bitmap[0]; chunk < &bitmap[nr_chunks]; chunk++) {
/* Does this chunk contain a free bit? */
if (*chunk == (bitchunk_t) ~0) continue;
/* Get bit number from the start of the bit map. */
for (i = 0; (*chunk & (1 << i)) != 0; ++i) {}
bit_nr = (chunk - &bitmap[0]) * BITCHUNK_BITS + i;
/* Don't allocate bits beyond the end of the map. */
if (bit_nr >= nr_bits) break;
*chunk |= 1 << bit_nr % BITCHUNK_BITS;
return(bit_nr);
}
return(-1);
}
#endif