Kernel: make SIGKMESS target process list dynamic
The set of processes to which a SIGKMESS signal is sent whenever new diagnostics messages are added to the kernel's message buffer, is now no longer hardcoded. Instead, processes can (un)register themselves to receive such notifications, by means of sys_diagctl(). Change-Id: I9d6ac006a5d9bbfad2757587a068fc1ec3cc083e
This commit is contained in:
@@ -20,7 +20,7 @@ void kputc(int c)
|
||||
static int buf_count; /* # characters in the buffer */
|
||||
|
||||
if ((c == 0 && buf_count > 0) || buf_count == sizeof(print_buf)) {
|
||||
sys_diagctl(DIAGCTL_CODE_DIAG, print_buf, buf_count);
|
||||
sys_diagctl_diag(print_buf, buf_count);
|
||||
buf_count = 0;
|
||||
}
|
||||
if (c != 0) {
|
||||
|
||||
@@ -11,9 +11,3 @@ int sys_diagctl(int code, char *arg1, int arg2)
|
||||
|
||||
return(_kernel_call(SYS_DIAGCTL, &m));
|
||||
}
|
||||
|
||||
int sys_diagctl_stacktrace(endpoint_t ep)
|
||||
{
|
||||
return sys_diagctl(DIAGCTL_CODE_STACKTRACE, NULL, ep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user