Merge branch 'master' of postpeta.pccluster.org:mckernel
This commit is contained in:
@@ -282,7 +282,7 @@ void check_need_resched(void);
|
||||
void cpu_set(int cpu, cpu_set_t *cpu_set, ihk_spinlock_t *lock);
|
||||
void cpu_clear(int cpu, cpu_set_t *cpu_set, ihk_spinlock_t *lock);
|
||||
|
||||
struct process *findthread_and_lock(int pid, int tid, void *savelock, unsigned long *irqstate);
|
||||
struct process *findthread_and_lock(int pid, int tid, ihk_spinlock_t **savelock, unsigned long *irqstate);
|
||||
void process_unlock(void *savelock, unsigned long irqstate);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -251,9 +251,9 @@ struct procfs_read {
|
||||
unsigned long pbuf; /* physical address of the host buffer (request) */
|
||||
unsigned long offset; /* offset to read (request) */
|
||||
int count; /* bytes to read (request) */
|
||||
int error; /* non-zero if below fields are invalid. (answer) */
|
||||
int eof; /* if eof is detected, 1 otherwise 0. (answer)*/
|
||||
int ret; /* read bytes (answer) */
|
||||
int status; /* non-zero if done (answer) */
|
||||
int newcpu; /* migrated new cpu (answer) */
|
||||
char fname[PROCFS_NAME_MAX]; /* procfs filename (request) */
|
||||
};
|
||||
|
||||
@@ -2066,7 +2066,7 @@ void runq_del_proc(struct process *proc, int cpu_id)
|
||||
}
|
||||
|
||||
struct process *
|
||||
findthread_and_lock(int pid, int tid, void *savelock, unsigned long *irqstate)
|
||||
findthread_and_lock(int pid, int tid, ihk_spinlock_t **savelock, unsigned long *irqstate)
|
||||
{
|
||||
struct cpu_local_var *v;
|
||||
struct process *p;
|
||||
@@ -2075,11 +2075,11 @@ findthread_and_lock(int pid, int tid, void *savelock, unsigned long *irqstate)
|
||||
|
||||
for(i = 0; i < num_processors; i++){
|
||||
v = get_cpu_local_var(i);
|
||||
*(ihk_spinlock_t **)savelock = &(v->runq_lock);
|
||||
*savelock = &(v->runq_lock);
|
||||
*irqstate = ihk_mc_spinlock_lock(&(v->runq_lock));
|
||||
list_for_each_entry(p, &(v->runq), sched_list){
|
||||
if(p->pid == pid &&
|
||||
p->tid == tid){
|
||||
(tid == -1 || p->tid == tid)){
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ void process_procfs_request(unsigned long rarg)
|
||||
int rosnum, ret, pid, tid, ans = -EIO, eof = 0;
|
||||
char *buf, *p;
|
||||
struct ihk_ikc_channel_desc *syscall_channel;
|
||||
void *savelock;
|
||||
ihk_spinlock_t *savelock;
|
||||
unsigned long irqstate;
|
||||
|
||||
dprintf("process_procfs_request: invoked.\n");
|
||||
@@ -449,6 +449,7 @@ end:
|
||||
dprintf("ret: %d, eof: %d\n", ans, eof);
|
||||
r->ret = ans;
|
||||
r->eof = eof;
|
||||
r->status = 1; /* done */
|
||||
packet.err = 0;
|
||||
bufunavail:
|
||||
ihk_mc_unmap_memory(NULL, pbuf, r->count);
|
||||
|
||||
Reference in New Issue
Block a user