Implement getrusage
Implement getrusage. These fields of struct rusage are not supported and always set to zero at this time long ru_nswap; /* swaps */ long ru_inblock; /* block input operations */ long ru_oublock; /* block output operations */ long ru_msgsnd; /* messages sent */ long ru_msgrcv; /* messages received */ long ru_nvcsw; /* voluntary context switches */ long ru_nivcsw; /* involuntary context switches */ test75.c is the unit test for this new function Change-Id: I3f1eb69de1fce90d087d76773b09021fc6106539
This commit is contained in:
committed by
Gerrit Code Review
parent
4241cc5d98
commit
64f10ee644
@@ -373,6 +373,7 @@ int send_sig(endpoint_t ep, int sig_nr)
|
||||
priv = priv(rp);
|
||||
if(!priv) return ENOENT;
|
||||
sigaddset(&priv->s_sig_pending, sig_nr);
|
||||
increase_proc_signals(rp);
|
||||
mini_notify(proc_addr(SYSTEM), rp->p_endpoint);
|
||||
|
||||
return OK;
|
||||
@@ -434,6 +435,7 @@ int sig_nr; /* signal to be sent */
|
||||
/* Check if the signal is already pending. Process it otherwise. */
|
||||
if (! sigismember(&rp->p_pending, sig_nr)) {
|
||||
sigaddset(&rp->p_pending, sig_nr);
|
||||
increase_proc_signals(rp);
|
||||
if (! (RTS_ISSET(rp, RTS_SIGNALED))) { /* other pending */
|
||||
RTS_SET(rp, RTS_SIGNALED | RTS_SIG_PENDING);
|
||||
if(OK != send_sig(sig_mgr, SIGKSIG))
|
||||
|
||||
Reference in New Issue
Block a user