From b386f0c5d35994a54e95d5fe1c4bcbfd1cdea59c Mon Sep 17 00:00:00 2001 From: Fu Juntang <StrongTiger_001@163.com> Date: 星期五, 03 九月 2021 17:43:11 +0800 Subject: [PATCH] Supplementary for the fix of the lock removal. --- src/bus_error.cpp | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/bus_error.cpp b/src/bus_error.cpp index 179211f..29d5683 100644 --- a/src/bus_error.cpp +++ b/src/bus_error.cpp @@ -11,12 +11,21 @@ static pthread_key_t strerrorKey; -static char *_bus_errlist[_bus_nerr] = { +static const char *_bus_errlist[_bus_nerr] = { "\0", - "Timeout", + "Timed out", "The other end is not inline", "Key already in use", - "Network fault" + "Network fault", + "Send to self error", + "Receive from wrong end", + "Service stoped", + "Exceed resource limit", + "Service not supported", + "Resource busy", + "Resource not provide", + "Invalid parameters", + "No enough memory" }; @@ -46,6 +55,10 @@ char *buf; /* Make first caller allocate key for thread-specific data */ + if (err == 0) { + err = EBUS_BASE; + } + s = pthread_once(&once, createKey); if (s != 0) err_exit(s, "pthread_once"); -- Gitblit v1.8.0