Re: double-checked locking in C



In article <zaudnbhMuPTj_1DfRVn-rg@xxxxxxxxxxx>,
Joe Seigh <jseigh_01@xxxxxxxxxx> wrote:
>So what kind of value could PTHREAD_ONCE_INIT have that couldn't be
>memcpy'd from an initialized pthread_once_t object never otherwise
>used?

Part of it might contain the address of another part of it. Of course, that
would have to be achieved with the assistance of the compiler, as a plain
#define wouldn't be enough. There's no obvious reason *why* it should
contain such a thing, but I assume the intent in the standard is to leave
the greatest freedom for implementations.
.



Relevant Pages

  • Re: Do all programming languages use files?
    ... >>Ben Pfaff wrote: ... >>>Hosted implementations of standard C implement a set of functions ... Prev by Date: ...
    (comp.programming)
  • Re: Warnings with gcc
    ... >> the standard doesn't define it. ... Implementations are allowed to define ... What about with static linkage? ... Prev by Date: ...
    (comp.lang.c)
  • Re: What declarations of main exist in the c standard?
    ... The Standard allows an implementation ... >only two forms that are guaranteed to work on all implementations. ... Prev by Date: ...
    (comp.lang.c)
  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... Linkname: c standard - clc-wiki ... with a signed zero (including all IEC 60559 implementations) ... that follow the specification of annex G, the sign of zero ... between brake pedal and brake pads being through a complicated ...
    (comp.lang.c)
  • Re: Storgae durations
    ... standard you referred to is no longer current. ... advocating C99 and saying that C90 is obsolete, ... Then you are in no position to make an argument about C99's portability ... there are implementations for C99 that target those platforms. ...
    (comp.lang.c)

Loading