Deutsch English Français Italiano |
<vc1fed$t0fj$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Muttley@dastardlyhq.com Newsgroups: comp.lang.c++ Subject: Re: counting_semaphore question Date: Fri, 13 Sep 2024 13:41:33 -0000 (UTC) Organization: A noiseless patient Spider Lines: 23 Message-ID: <vc1fed$t0fj$1@dont-email.me> References: <vbrqjj$3hvsd$1@dont-email.me> <vbs01c$3j5mc$1@raubtier-asyl.eternal-september.org> <vbs0tm$3jf62$1@dont-email.me> <vbs1al$3jgnp$1@raubtier-asyl.eternal-september.org> <vbs2fm$3jp23$1@dont-email.me> <87ikv1i2yk.fsf@bsb.me.uk> <vbuhk4$7hu2$1@dont-email.me> <vbuu5g$a0rk$1@dont-email.me> <vbuv8g$a8h2$1@dont-email.me> <vc0mnm$nseo$1@dont-email.me> <vc0pfm$oj79$1@dont-email.me> <vc15lt$qr6p$1@dont-email.me> <vc1e8f$sojp$1@dont-email.me> <vc1enm$sqee$1@raubtier-asyl.eternal-september.org> Injection-Date: Fri, 13 Sep 2024 15:41:33 +0200 (CEST) Injection-Info: dont-email.me; posting-host="e9c6906c66bb8038990d860c394497cf"; logging-data="950771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DSUgU6ZZz+yrLvqeAqFgV" Cancel-Lock: sha1:4nUwJa7JUyiGmBtLyB1hDP8i4+4= Bytes: 1979 On Fri, 13 Sep 2024 15:29:37 +0200 Bonita Montero <Bonita.Montero@gmail.com> boringly babbled: >Am 13.09.2024 um 15:21 schrieb Muttley@dastardlyhq.com: > >> Oh right, so for 32 bit TCP seq number instead of just doing: >> >> ++tcp->seq_num; >> >> which would autonatically wrap after 2^32, in your world we'd have do to: >> >> tcp->seq_num = (uint32_t)(((uint_64_t)tcp->seq_num + 1) % 0x100000000L); >> >> Really? >> >> Don't be an ass. > >I've also not seen any meaningful code which shows what this >maximum is good for .... But what sense should a wrap-around >make with a semaphore ??? A semaphore should remember all its >releases if possible. Its not about semaphores any more, its about wrapping values in general.