procfs_read/write(): rewrite synchronization for scalability and correctness
This commit is contained in:
@@ -532,7 +532,7 @@ static void syscall_channel_send(struct ihk_ikc_channel_desc *c,
|
||||
}
|
||||
|
||||
extern unsigned long do_kill(struct thread *, int, int, int, struct siginfo *, int ptracecont);
|
||||
extern void process_procfs_request(unsigned long rarg);
|
||||
extern void process_procfs_request(struct ikc_scd_packet *rpacket);
|
||||
extern void terminate_host(int pid);
|
||||
extern void debug_log(long);
|
||||
|
||||
@@ -640,7 +640,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
||||
break;
|
||||
|
||||
case SCD_MSG_PROCFS_REQUEST:
|
||||
process_procfs_request(packet->arg);
|
||||
process_procfs_request(packet);
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ procfs_delete_thread(struct thread *thread)
|
||||
*
|
||||
* \param rarg returned argument
|
||||
*/
|
||||
void
|
||||
process_procfs_request(unsigned long rarg)
|
||||
void process_procfs_request(struct ikc_scd_packet *rpacket)
|
||||
{
|
||||
unsigned long rarg = rpacket->arg;
|
||||
unsigned long parg, pbuf;
|
||||
struct thread *thread = NULL;
|
||||
struct thread *thread = NULL;
|
||||
struct process *proc = NULL;
|
||||
struct process_vm *vm = NULL;
|
||||
struct procfs_read *r;
|
||||
@@ -633,6 +633,7 @@ dataunavail:
|
||||
|
||||
packet.msg = SCD_MSG_PROCFS_ANSWER;
|
||||
packet.arg = rarg;
|
||||
packet.pid = rpacket->pid;
|
||||
|
||||
ret = ihk_ikc_send(syscall_channel, &packet, 0);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user