From patchwork Thu Nov 24 03:27:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waldemar Brodkorb X-Patchwork-Id: 698597 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tPPlt2BJhz9t0H for ; Thu, 24 Nov 2016 14:27:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C18FF880E3; Thu, 24 Nov 2016 03:27:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0xRU8Y-Eq6xV; Thu, 24 Nov 2016 03:27:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DF65C88017; Thu, 24 Nov 2016 03:27:32 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 42D2A1BFB4C for ; Thu, 24 Nov 2016 03:27:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 40A078800E for ; Thu, 24 Nov 2016 03:27:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GPg63BAxU3xL for ; Thu, 24 Nov 2016 03:27:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) by whitealder.osuosl.org (Postfix) with ESMTPS id D650488017 for ; Thu, 24 Nov 2016 03:27:30 +0000 (UTC) Received: by helium.openadk.org (Postfix, from userid 1000) id CB47910190; Thu, 24 Nov 2016 04:27:27 +0100 (CET) Date: Thu, 24 Nov 2016 04:27:27 +0100 From: Waldemar Brodkorb To: Frank Liu Subject: Re: uclibc(1.0.12) mq_send return value and errno issue Message-ID: <20161124032727.GC27313@waldemar-brodkorb.de> References: <9947f0190edd4b36b6d5233b65c88088@RV-MSX01.UBS.LOCAL> <20161118061325.GF27313@waldemar-brodkorb.de> <7d4eb69bc7514895b55b003d65b58892@RV-MSX01.UBS.LOCAL> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7d4eb69bc7514895b55b003d65b58892@RV-MSX01.UBS.LOCAL> X-Operating-System: Linux 3.16.0-4-amd64 x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "'uclibc@uclibc.org'" , "Dushara Jayasinghe \(dushara@successful.com.au\)" , "devel@uclibc-ng.org" X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Hi Frank, Frank Liu wrote, > Please see the attached sample code. > > If I turn READERS and WRITERS to 0, the test works fine. > > Adding another thread in the process by setting a non-zero number to either READERS or WRITER, the test program crashes due to the assertion at line 99. I think I found the reason for the problem. Try attached patch, best regards Waldemar From 650e6cbd0fccf8d20efc0844582934eae8da1f58 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 24 Nov 2016 04:14:20 +0100 Subject: [PATCH 1/2] arm: use common ret_ERRVAL Signed-off-by: Waldemar Brodkorb --- libc/sysdeps/linux/arm/sysdep.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h index 80bf9ec..8813f8e 100644 --- a/libc/sysdeps/linux/arm/sysdep.h +++ b/libc/sysdeps/linux/arm/sysdep.h @@ -137,9 +137,6 @@ #define PSEUDO_END_ERRVAL(name) \ END (name) -#undef ret_ERRVAL -#define ret_ERRVAL PSEUDO_RET_NOERRNO - #if defined NOT_IN_libc # define SYSCALL_ERROR __local_syscall_error # define SYSCALL_ERROR_HANDLER \ -- 2.1.4