*** empty log message ***

This commit is contained in:
Jorrit Herder 2005-07-19 15:01:47 +00:00
parent b3a28466bb
commit 1d7bdd4ab1
11 changed files with 17 additions and 36 deletions

View file

@ -31,7 +31,7 @@ kernel build install: $(HEAD) $(OBJS)
clean:
cd system && $(MAKE) -$(MAKEFLAGS) $@
rm -f *.a *.o *.bak kernel
rm -f *.a *.o *~ *.bak kernel
depend:
cd system && $(MAKE) -$(MAKEFLAGS) $@

View file

@ -52,6 +52,10 @@ unsigned vec_nr;
return;
}
/* If an exception occurs while running a process, the k_reenter variable
* will be zero. Exceptions in interrupt handlers or system traps will make
* k_reenter larger than zero.
*/
if (k_reenter == 0 && ! iskernelp(saved_proc)) {
cause_sig(proc_nr(saved_proc), ep->signum);
return;
@ -62,7 +66,8 @@ unsigned vec_nr;
kprintf("\nIntel-reserved exception %d\n", vec_nr);
else
kprintf("\n%s\n", karg(ep->msg));
kprintf("process number %d, ", proc_nr(saved_proc));
kprintf("process number %d ", proc_nr(saved_proc));
kprintf("(%s), ", saved_proc->p_name);
kprintf("pc = %d:", (unsigned) saved_proc->p_reg.cs);
kprintf("0x%x\n", (unsigned) saved_proc->p_reg.pc);

View file

@ -4,7 +4,6 @@
* can be slightly different.
* March 2005, Jorrit N. Herder.
* Entrypoints into this file:
* katoi: convert string to integer
* kmemcpy: copy n bytes from pointer p1 to pointer p2
* kmemset: set n bytes to c starting at pointer p
* kprintf: printf for the kernel (see working below)
@ -28,23 +27,6 @@
FORWARD _PROTOTYPE(void kputc, (int c));
/*=========================================================================*
* katoi *
*=========================================================================*/
PUBLIC int katoi(register const char *s)
{
int value = 0; /* default value */
int sign = 1; /* assume positive */
while(*s == ' ') s++; /* skip spaces */
if (*s == '-') { sign = -1; s++; } /* detect sign */
while(isdigit(*s)) /* get integer */
value = value*10 + (*s++) -'0';
return(sign * value); /* return result */
}
/*=========================================================================*
* kmemcpy *
*=========================================================================*/

View file

@ -183,11 +183,8 @@ message *m_ptr; /* pointer to message in the caller's space */
break;
case NOTIFY:
result = mini_notify(caller_ptr, src_dst, m_ptr);
#if TEMP_CODE
break;
case ECHO:
kprintf("Echo message from process %s\n", proc_nr(caller_ptr));
#endif
CopyMess(caller_ptr->p_nr, caller_ptr, m_ptr, caller_ptr, m_ptr);
result = OK;
break;

View file

@ -16,7 +16,6 @@ _PROTOTYPE( void set_timer, (struct timer *tp, clock_t t, tmr_func_t f) );
_PROTOTYPE( void reset_timer, (struct timer *tp) );
/* klibc.c */
_PROTOTYPE( int katoi, (register const char *s));
_PROTOTYPE( void *kmemcpy, (void *s1, const void *s2, register size_t n));
_PROTOTYPE( void *kmemset, (void *s, register int c, register size_t n));
_PROTOTYPE( int kstrcmp, (register const char *s1, register const char *s2));

View file

@ -11,6 +11,7 @@
#include "kernel.h"
#include "protect.h"
#include "proc.h"
#include <stdlib.h>
FORWARD _PROTOTYPE( char *get_value, (_CONST char *params, _CONST char *key));
@ -64,7 +65,7 @@ U16_t parmoff, parmsize; /* boot parameters offset and length */
kinfo.kmem_size = (phys_bytes) &end;
/* Processor? 86, 186, 286, 386, ... */
machine.processor=katoi(get_value(params, "processor"));
machine.processor=atoi(get_value(params, "processor"));
/* Decide if mode is protected for older machines. */
#if _WORD_SIZE == 2

View file

@ -13,6 +13,7 @@
* there are several other minor entry points:
* send_sig: send signal directly to a system process
* cause_sig: take action to cause a signal to occur via PM
* init_proc: initialize a process, during start up or fork
* clear_proc: clean up a process in the process table, e.g. on exit
* umap_local: map virtual address in LOCAL_SEG to physical
* umap_remote: map virtual address in REMOTE_SEG to physical
@ -216,7 +217,7 @@ int proc_nr; /* slot of process to clean up */
rc = proc_addr(proc_nr);
/* Turn off any alarm timers at the clock. */
reset_timer(&rc->p_priv->s_alarm_timer);
reset_timer(&priv(rc)->s_alarm_timer);
/* Make sure the exiting process is no longer scheduled. */
if (rc->p_rts_flags == 0) lock_unready(rc);
@ -248,11 +249,11 @@ int proc_nr; /* slot of process to clean up */
irq_hooks[i].proc_nr = NONE;
}
#if TEMP_CODE
/* Check if there are pending notifications. Release the buffers. */
while (rc->p_ntf_q != NULL) {
i = (int) (rc->p_ntf_q - &notify_buffer[0]);
free_bit(i, notify_bitmap, NR_NOTIFY_BUFS);
#if TEMP_CODE
rc->p_ntf_q = rc->p_ntf_q->n_next;
}
#endif

View file

@ -48,7 +48,7 @@ $(SYSTEM): $(OBJECTS)
aal cr $@ *.o
clean:
rm -f $(SYSTEM) *.o *.bak
rm -f $(SYSTEM) *.o *~ *.bak
depend:
/usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" *.c > .depend

View file

@ -3,9 +3,6 @@
*
* The parameters for this system call are:
* m1_i1: PR_PROC_NR (process that did exec call)
#if DEAD_CODE
* m1_i3: PR_TRACING (flag to indicate tracing is on/ off)
#endif
* m1_p1: PR_STACK_PTR (new stack pointer)
* m1_p2: PR_NAME_PTR (pointer to program name)
* m1_p3: PR_IP_PTR (new instruction pointer)
@ -28,9 +25,6 @@ register message *m_ptr; /* pointer to request message */
char *np;
rp = proc_addr(m_ptr->PR_PROC_NR);
#if DEAD_CODE
if (m_ptr->PR_TRACING) cause_sig(m_ptr->PR_PROC_NR, SIGTRAP);
#endif
sp = (reg_t) m_ptr->PR_STACK_PTR;
rp->p_reg.sp = sp; /* set the stack pointer */
#if (CHIP == M68000)

View file

@ -8,6 +8,7 @@
*/
#include "../system.h"
#include <string.h>
#include <signal.h>
#include <sys/sigcontext.h>
@ -61,7 +62,7 @@ message *m_ptr; /* pointer to request message */
#endif
/* Restore the registers. */
kmemcpy(&rp->p_reg, (char *)&sc.sc_regs, sizeof(struct sigregs));
memcpy(&rp->p_reg, (char *)&sc.sc_regs, sizeof(struct sigregs));
return(OK);
}
#endif /* USE_SIGRETURN */

View file

@ -10,6 +10,7 @@
#include "../system.h"
#include <signal.h>
#include <string.h>
#include <sys/sigcontext.h>
#if USE_SIGSEND
@ -40,7 +41,7 @@ message *m_ptr; /* pointer to request message */
scp = (struct sigcontext *) smsg.sm_stkptr - 1;
/* Copy the registers to the sigcontext structure. */
kmemcpy(&sc.sc_regs, &rp->p_reg, sizeof(struct sigregs));
memcpy(&sc.sc_regs, &rp->p_reg, sizeof(struct sigregs));
/* Finish the sigcontext initialization. */
sc.sc_flags = SC_SIGCONTEXT;