Re: atomic reference counting primatives.
From: John Baldwin (jhb_at_FreeBSD.org)
Date: 05/24/04
- Previous message: John Baldwin: "Re: atomic reference counting primatives."
- In reply to: Daniel Eischen: "Re: atomic reference counting primatives."
- Next in thread: Daniel Eischen: "Re: atomic reference counting primatives."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Daniel Eischen <eischen@vigrid.com> Date: Mon, 24 May 2004 14:59:04 -0400
On Monday 24 May 2004 10:50 am, Daniel Eischen wrote:
> On Mon, 24 May 2004, John Baldwin wrote:
> > atomic_cmpset() is an "official" primitive. The problem is that Mike is
> > using an enum and assuming that all enum's are ints which is not
> > necessarily true. The code should perhaps use an int with #define's
> > instead to guarantee that the variable is an int and not a short, char,
> > or long.
>
> You can't use atomic_cmpset() in userland on 386, so
> if it is being used in libthr, the machine must be
> checked to make sure it will work, otherwise should
> fall back to something else...
I'd be fine with it being a compile option to be honest. We already don't
support 80386's out of the box since they need a custom kernel. I'd rather
not pessimize world + dog for the 80386.
-- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: John Baldwin: "Re: atomic reference counting primatives."
- In reply to: Daniel Eischen: "Re: atomic reference counting primatives."
- Next in thread: Daniel Eischen: "Re: atomic reference counting primatives."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: atomic reference counting primatives.
... >> using an enum and assuming that all enum's are ints which is not ...
support 80386's out of the box since they need a custom kernel. ... (freebsd-arch) - Re: enum question.
... Why is compiler not even warning about it? ... In C an enum ...
because the values are ints and can be the results of ... (comp.lang.c) - Re: smarter enums
... I don't have any advice to give you about how to do this, ... added features
over a standard enum. ... AFAIK, you can still throw them around like the ints they
represent, ... enum Result {SUCCESS, FAILURE}; ... (comp.lang.cpp) - Re: enums ... what am I doing wrong?
... > I'm casting enums back and forth to ints so to use them as an index ...
How about using constants instead of enum values? ... same readability of enum ...
(microsoft.public.dotnet.languages.csharp) - Re: Custom values in Enum
... The only reason to use byte or short in or out of an enum is if you are going to hold
a big collection or matrix of them and you want to relieve memory pressure. ... The system
architecture is generally most efficient in terms of access speed, with ints. ... Is there
a way to declare an Enum with non-secventual values? ... (microsoft.public.dotnet.languages.csharp)