From 434253f2763c99351a8c790f43704cca816ba442 Mon Sep 17 00:00:00 2001 From: Doug Gilbert Date: Thu, 14 Jun 2012 15:23:25 -0500 Subject: Mailbox additional error handling for Hardware errors and Invalid messages RTC: 37990 Change-Id: I8378845ed412490a3bd214ac5198ea1fc9f19664 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1221 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell Reviewed-by: A. Patrick Williams III --- src/lib/syscall_msg.C | 58 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 22 deletions(-) (limited to 'src/lib/syscall_msg.C') diff --git a/src/lib/syscall_msg.C b/src/lib/syscall_msg.C index 8374d0d34..b35f6eef1 100644 --- a/src/lib/syscall_msg.C +++ b/src/lib/syscall_msg.C @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/lib/syscall_msg.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2010 - 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/lib/syscall_msg.C $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2010-2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #include #include #include @@ -67,6 +68,19 @@ int msg_q_register(msg_q_t q, const char* name) } } +int msg_q_remove(const char * name) +{ + msg_q_t vfsQ = (msg_q_t)_syscall1(MSGQ_RESOLVE_ROOT, + reinterpret_cast(MSGQ_ROOT_VFS)); + msg_t * msg = msg_allocate(); + msg->type = VFS_MSG_REMOVE_MSGQ; + msg->extra_data = (void *)name; + msg_sendrecv(vfsQ, msg); + int rc = static_cast(msg->data[0]); + msg_free(msg); + return rc; +} + msg_q_t msg_q_resolve(const char* name) { if (0 == strcmp(VFS_ROOT, name)) -- cgit v1.2.1