_PROTOTYPE( int printf, (const char *fmt, ...));
_PROTOTYPE( void kputc, (int c));
-_PROTOTYPE( void panic, (const char *fmt, ...));
+_PROTOTYPE( __dead void panic, (const char *fmt, ...));
_PROTOTYPE( int getuptime, (clock_t *ticks));
_PROTOTYPE( int getuptime2, (clock_t *ticks, time_t *boottime));
_PROTOTYPE( int tickdelay, (clock_t ticks));
struct tm *tmp) );
_PROTOTYPE( size_t strftime, (char *_s, size_t _max, const char *_fmt,
const struct tm *_timep) );
-_PROTOTYPE(char *strptime, (const char *buf, const char *format,
+_PROTOTYPE( char *strptime, (const char *buf, const char *format,
struct tm *timeptr) );
+_PROTOTYPE( time_t timegm, (struct tm * const tmp) );
+
#ifdef _POSIX_SOURCE
_PROTOTYPE( void tzset, (void) );
.elif ${COMPILER_TYPE} == "gnu"
CPPFLAGS+= -fno-builtin -ffreestanding -fno-stack-protector
LDFLAGS+= -T arch/${ARCH}/kernel.lds
-LDFLAGS+= -nostdlib
+LDFLAGS+= -nostdlib -L/usr/gnu/lib
DPADD+= ${LIBC}
LDADD+= -lc
.endif
val |= APIC_ENABLE | APIC_SPURIOUS_INT_VECTOR;
val &= ~APIC_FOCUS_DISABLED;
lapic_write(LAPIC_SIVR, val);
- lapic_read(LAPIC_SIVR);
+ (void) lapic_read(LAPIC_SIVR);
*((u32_t *)lapic_eoi_addr) = 0;
/* accept all interrupts */
lapic_write (LAPIC_TPR, val & ~0xFF);
- lapic_read (LAPIC_SIVR);
+ (void) lapic_read (LAPIC_SIVR);
*((u32_t *)lapic_eoi_addr) = 0;
apic_calibrate_clocks();
FORWARD _PROTOTYPE( void ser_debug, (int c));
-PUBLIC void arch_monitor(void)
+PUBLIC __dead void arch_monitor(void)
{
monitor();
}
PUBLIC int cpu_has_tsc;
-PUBLIC void arch_shutdown(const int how)
+PUBLIC __dead void arch_shutdown(const int how)
{
vm_stop();
/* Setup PC tas NMI for watchdog, is is masked for now */
lapic_write(LAPIC_LVTPCR, APIC_ICR_INT_MASK | APIC_ICR_DM_NMI);
- lapic_read(LAPIC_LVTPCR);
+ (void) lapic_read(LAPIC_LVTPCR);
/* double check if LAPIC is enabled */
if (lapic_addr && watchdog_enabled && watchdog->init) {
_PROTOTYPE( void exception, (struct exception_frame * frame));
/* klib386.s */
-_PROTOTYPE( void monitor, (void) );
-_PROTOTYPE( void reset, (void) );
+_PROTOTYPE( __dead void monitor, (void) );
+_PROTOTYPE( __dead void reset, (void) );
_PROTOTYPE( void int86, (void) );
_PROTOTYPE( reg_t read_cr0, (void) );
_PROTOTYPE( reg_t read_cr2, (void) );
/* main.c */
_PROTOTYPE( void main, (void) );
_PROTOTYPE( void prepare_shutdown, (int how) );
-_PROTOTYPE( void minix_shutdown, (struct timer *tp) );
+_PROTOTYPE( __dead void minix_shutdown, (struct timer *tp) );
/* proc.c */
_PROTOTYPE( void halt_cpu, (void) );
_PROTOTYPE( void arch_init, (void) );
_PROTOTYPE( void ser_putc, (char) );
-_PROTOTYPE( void arch_shutdown, (int) );
-_PROTOTYPE( void arch_monitor, (void) );
+_PROTOTYPE( __dead void arch_shutdown, (int) );
+_PROTOTYPE( __dead void arch_monitor, (void) );
_PROTOTYPE( void arch_get_aout_headers, (int i, struct exec *h) );
_PROTOTYPE( void restore_user_context, (struct proc * p) );
_PROTOTYPE( void read_tsc, (unsigned long *high, unsigned long *low) );
panic("send_sig to empty process: %d", proc_nr);
rp = proc_addr(proc_nr);
- sigaddset(&priv(rp)->s_sig_pending, sig_nr);
+ (void) sigaddset(&priv(rp)->s_sig_pending, sig_nr);
mini_notify(proc_addr(SYSTEM), rp->p_endpoint);
}
panic("cause_sig: signal manager gets lethal signal %d for itself",
sig_nr);
}
- sigaddset(&priv(rp)->s_sig_pending, sig_nr);
+ (void) sigaddset(&priv(rp)->s_sig_pending, sig_nr);
send_sig(rp->p_endpoint, SIGKSIGSM);
return;
}
/* Check if the signal is already pending. Process it otherwise. */
if (! sigismember(&rp->p_pending, sig_nr)) {
- sigaddset(&rp->p_pending, sig_nr);
+ (void) sigaddset(&rp->p_pending, sig_nr);
if (! (RTS_ISSET(rp, RTS_SIGNALED))) { /* other pending */
RTS_SET(rp, RTS_SIGNALED | RTS_SIG_PENDING);
send_sig(sig_mgr, SIGKSIG);
* Only one in group should have RTS_SIGNALED, child doesn't inherit tracing.
*/
RTS_UNSET(rpc, (RTS_SIGNALED | RTS_SIG_PENDING | RTS_P_STOP));
- sigemptyset(&rpc->p_pending);
+ (void) sigemptyset(&rpc->p_pending);
rpc->p_seg.p_cr3 = 0;
rpc->p_seg.p_cr3_v = NULL;
/* store signaled process' endpoint */
m_ptr->SIG_ENDPT = rp->p_endpoint;
m_ptr->SIG_MAP = rp->p_pending; /* pending signals map */
- sigemptyset(&rp->p_pending); /* clear map in the kernel */
+ (void) sigemptyset(&rp->p_pending); /* clear map in the kernel */
RTS_UNSET(rp, RTS_SIGNALED); /* blocked by SIG_PENDING */
return(OK);
}
for (i=0; i< NR_SYS_CHUNKS; i++) /* remove pending: */
priv(rp)->s_notify_pending.chunk[i] = 0; /* - notifications */
priv(rp)->s_int_pending = 0; /* - interrupts */
- sigemptyset(&priv(rp)->s_sig_pending); /* - signals */
+ (void) sigemptyset(&priv(rp)->s_sig_pending); /* - signals */
reset_timer(&priv(rp)->s_alarm_timer); /* - alarm */
priv(rp)->s_asyntab= -1; /* - asynsends */
priv(rp)->s_asynsize= 0;