PERFORCE change 182356 for review
Gabor Kovesdan
gabor at FreeBSD.org
Fri Aug 13 13:25:53 UTC 2010
http://p4web.freebsd.org/@@182356?ac=10
Change 182356 by gabor at gabor_aspire on 2010/08/13 13:25:17
- Fix compilation.
Affected files ...
.. //depot/projects/soc2010/gabor_jobs/hrl_and_jobs/sys/kern/kern_jobs.c#2 edit
Differences ...
==== //depot/projects/soc2010/gabor_jobs/hrl_and_jobs/sys/kern/kern_jobs.c#2 (text+ko) ====
@@ -28,7 +28,7 @@
#include <sys/param.h>
__FBSDID("$FreeBSD");
-#include "opt_irix_jobs.h"
+#include "opt_jobs.h"
#include <sys/container.h>
#include <sys/errno.h>
@@ -148,7 +148,7 @@
*/
jp = jobentry_alloc(uap->rjid);
pp = malloc(sizeof(struct procentry), M_IRIX_JOBS, M_NOWAIT | M_ZERO);
- pp->td_proc = &td->td_proc;
+ pp->td_proc = td->td_proc;
LIST_INIT(&jp->proclist);
LIST_INSERT_HEAD(&jp->proclist, pp, entries);
JOBLIST_WLOCK;
@@ -178,7 +178,7 @@
if (jp->jid == (jid_t)uap->jid) {
LIST_FOREACH_SAFE(pp, &jp->proclist, entries, ptmp) {
struct kill_args kuap;
-#ifdef 0
+#if 0
printf("killjob traversed pid %d\n", pp->td_proc->p_pid);
#endif
kuap.pid = pp->td_proc->p_pid;
@@ -292,19 +292,21 @@
return (ENOJOB);
}
-#define RSUM(j, r) struct procentry *pp; \
+#define RSUM(j, r) do { \
+ struct procentry *pp; \
JOBLIST_RLOCK; \
LIST_FOREACH(jp, &irix_joblist, entries) { \
if (jp->jid == j) { \
LIST_FOREACH(pp, &jp->proclist, \
entries) \
- usage += pp->p_proc-> \
- p_container-> \
+ usage += pp->td_proc-> \
+ p_container. \
c_resources[r]; \
break; \
} \
} \
- JOBLIST_RUNLOCK;
+ JOBLIST_RUNLOCK; \
+ } while(0)
rlim_t
irix_jobs_getjusage(jid_t jid, int resource)
{
More information about the p4-projects
mailing list