From: Ben Gras Date: Tue, 11 Jun 2013 15:13:52 +0000 (+0000) Subject: inline sendnb should not call send vector X-Git-Tag: v3.3.0~926 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=9e43052b212c551cd99239f894740566a95aefa5;p=minix.git inline sendnb should not call send vector . also vfs has to reply to a vm call - so use asynsend for that Change-Id: I30ac1e591191dea5c99e25b03151a4415d1151b0 --- diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 85b84e9c7..e2ddcfa32 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -227,7 +227,7 @@ static inline int _sendrec(endpoint_t src_dest, message *m_ptr) static inline int _sendnb(endpoint_t dest, message *m_ptr) { - return _minix_ipcvecs.send(dest, m_ptr); + return _minix_ipcvecs.sendnb(dest, m_ptr); } static inline int _notify(endpoint_t dest) diff --git a/servers/vfs/misc.c b/servers/vfs/misc.c index 9dddfd5fe..6d9a7269e 100644 --- a/servers/vfs/misc.c +++ b/servers/vfs/misc.c @@ -382,6 +382,7 @@ int do_vm_call(message *m_out) int slot; struct fproc *rfp, *vmf; struct filp *f = NULL; + int r; if(job_m_in.m_source != VM_PROC_NR) return ENOSYS; @@ -468,7 +469,16 @@ reqdone: m_out->VMV_RESULT = result; m_out->VMV_REQID = req_id; - return VM_VFS_REPLY; + /* reply asynchronously as VM may not be able to receive + * a sendnb() message + */ + + m_out->m_type = VM_VFS_REPLY; + r = asynsend3(VM_PROC_NR, m_out, 0); + if(r != OK) printf("VFS: couldn't asynsend3() to VM\n"); + + /* VFS does not reply any further */ + return SUSPEND; } /*===========================================================================*