From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23661 invoked by alias); 6 Feb 2018 12:05:27 -0000 Mailing-List: contact libc-help-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: libc-help-owner@sourceware.org Received: (qmail 22493 invoked by uid 89); 6 Feb 2018 12:05:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*c:alternative, our X-HELO: mail-it0-f47.google.com Received: from mail-it0-f47.google.com (HELO mail-it0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Feb 2018 12:05:25 +0000 Received: by mail-it0-f47.google.com with SMTP id k6so2163626ita.3 for ; Tue, 06 Feb 2018 04:05:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XgnUJI2M/xEO+Aeia4kwwT+CayzBGHN+kf9NcX1FJng=; b=s9GQ2KhW+eRMsarKxpfdrWRF/Fbng5pSCeBaxotieiVc+CpGvYJpk2kxhg3U4BISzy QOd5cF7lfmab8vCInUMuFxMQcE7oilwr/dB6YFeWrXIviTaFWVv5Vg2mN9FhQVPe1oDi D0us0KbaRamdVYyAL4t/yHEKiWl98Uj4PeyDfx9NsaQ/QXaVXwv+Lq4iGI3HIrItAOKc a0SCAFLaR0LqO+HDH9qeWmqpyRgMa5KQ2o5eAT2t5Rqd0NtUC9gQrhvtDnet9Pf37pAC CFlrcF/LvortmTo/orSm8Qu7ZZf/fmds2OCKjGHx0iM2Fxb1JSve1QsCpaZJBpARZbdB 4XsQ== X-Gm-Message-State: APf1xPCQCdlrv/lp5rQOwpKhyy73HQ4kNy7P1AKtjX1aGGjjPKQxA5HI TfaWeDTwc80tu46biYPw4slH9loipyDkZPOS2e8= X-Google-Smtp-Source: AH8x226OLmJ9XVCDbsoPnv7jifYYtx30Yoogbw5jd2nJl/EVx3DULAAsaw57RomDgNROYOwlPbAsd/Wlk+b/rUOeQwU= X-Received: by 10.36.31.67 with SMTP id d64mr2550567itd.127.1517918723947; Tue, 06 Feb 2018 04:05:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.137.1 with HTTP; Tue, 6 Feb 2018 04:05:03 -0800 (PST) From: Alexandre Bique Date: Tue, 06 Feb 2018 12:05:00 -0000 Message-ID: Subject: sem_post() but with a count To: libc-help@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00006.txt.bz2 Hi, I'm working on a cross platform project, and on Windows, ReleaseSemaphore() can take a count, however our sem_post() takes an implicit count of one. By reading the source code I can see that we could save some CPU if we were able to do sem_post_np(count). What do you think? Am I missing something? Regards, -- Alexandre Bique