Fwiw, I found some of my old code:
[snip]
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:
[snip]
...And you felt compelled to post it, why exactly? Did you have
some question about it? Was there some aspect of C you are
unsure of and you need some help?
On 5/21/2026 2:06 PM, Dan Cross wrote:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:...And you felt compelled to post it, why exactly? Did you have
[snip]
some question about it? Was there some aspect of C you are
unsure of and you need some help?
Is this commonly used, Kosher? Its from some really old code of mine.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 5/21/2026 2:06 PM, Dan Cross wrote:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:...And you felt compelled to post it, why exactly? Did you have
[snip]
some question about it? Was there some aspect of C you are
unsure of and you need some help?
Is this commonly used, Kosher? Its from some really old code of mine.
Is *what* commonly used? What part of your 500+ lines of C code
are you asking about?
It appears to be two different *.h files. The first one appears
to depend on some macros that are defined in another header, but
it has no #include directives.
It's not worth my time to dig into it any further.
On 5/21/2026 5:36 PM, Keith Thompson wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 5/21/2026 2:06 PM, Dan Cross wrote:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:...And you felt compelled to post it, why exactly? Did you have
[snip]
some question about it? Was there some aspect of C you are
unsure of and you need some help?
Is this commonly used, Kosher? Its from some really old code of mine.
Is *what* commonly used? What part of your 500+ lines of C code
are you asking about?
It appears to be two different *.h files. The first one appears
to depend on some macros that are defined in another header, but
it has no #include directives.
It's not worth my time to dig into it any further.
Say, this part:
[snip many lines of random typedefs and macros]
In article <10uoril$197kd$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 5/21/2026 5:36 PM, Keith Thompson wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 5/21/2026 2:06 PM, Dan Cross wrote:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:...And you felt compelled to post it, why exactly? Did you have
[snip]
some question about it? Was there some aspect of C you are
unsure of and you need some help?
Is this commonly used, Kosher? Its from some really old code of mine.
Is *what* commonly used? What part of your 500+ lines of C code
are you asking about?
It appears to be two different *.h files. The first one appears
to depend on some macros that are defined in another header, but
it has no #include directives.
It's not worth my time to dig into it any further.
Say, this part:
[snip many lines of random typedefs and macros]
...you posted over a hundred lines of nothing but preprocessor
macros and typedefs, absent any kind of context.
Regardless, no, none of that is commonly used. Please don't
respond with some pointless question like, "don't people use
atomic operations?" or something vague and divorced from what
you are actually posting. For that matter, please don't post
any code that isn't accompanied by a specific, well-worded
question about that code.
On 5/22/2026 10:42 AM, Dan Cross wrote:
In article <10uoril$197kd$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
On 5/21/2026 5:36 PM, Keith Thompson wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 5/21/2026 2:06 PM, Dan Cross wrote:Is *what* commonly used? What part of your 500+ lines of C code
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:...And you felt compelled to post it, why exactly? Did you have
[snip]
some question about it? Was there some aspect of C you are
unsure of and you need some help?
Is this commonly used, Kosher? Its from some really old code of mine. >>>>
are you asking about?
It appears to be two different *.h files. The first one appears
to depend on some macros that are defined in another header, but
it has no #include directives.
It's not worth my time to dig into it any further.
Say, this part:
[snip many lines of random typedefs and macros]
...you posted over a hundred lines of nothing but preprocessor
macros and typedefs, absent any kind of context.
Regardless, no, none of that is commonly used. Please don't
respond with some pointless question like, "don't people use
atomic operations?" or something vague and divorced from what
you are actually posting. For that matter, please don't post
any code that isn't accompanied by a specific, well-worded
question about that code.
Simply trying to abstract a cpu specific api into the main portable api. >Macros and typedefs worked fine for me and the users. Quick and dirty >perhaps, but works.
_________
typedef ac_i686_intword_t ac_intword_t;
typedef ac_i686_uintword_t ac_uintword_t;
#define ac_atomic_cas_fence ac_i686_atomic_cas_fence
_________
The user uses the ac_atomic_cas_fence function. They do not need to
really care if its from an i686 or from a SPARC, a PPC, ect...
ac_i686_atomic_cas_fence has its impl in cpu specific ASM. Say:
https://web.archive.org/web/20060214112345/http://appcore.home.comcast.net/appcore/src/cpu/i686/ac_i686_gcc_asm.html
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:
[snip]
...And you felt compelled to post it, why exactly? Did you have
some question about it? Was there some aspect of C you are
unsure of and you need some help?
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:
[snip]
...And you felt compelled to post it, why exactly? Did you have
some question about it? Was there some aspect of C you are
unsure of and you need some help?
There are a few people who sometimes post in comp.lang.c (and
perhaps other newsgroups) who are, IMO, never worth reading or
responding to. I'm sorry to say that Chris Thomasson is one of
them.
Are you asking about the technique of using `typedef` and
macros?
Yes, those are used for writing portable code.
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:
[snip]
...And you felt compelled to post it, why exactly? Did you have
some question about it? Was there some aspect of C you are
unsure of and you need some help?
There are a few people who sometimes post in comp.lang.c (and
perhaps other newsgroups) who are, IMO, never worth reading or
responding to. I'm sorry to say that Chris Thomasson is one of
them.
On 5/22/2026 2:03 PM, Dan Cross wrote:
[...]
Are you asking about the technique of using `typedef` and
macros?
Yeah. I was wondering if the macros are okay vs creating stub functions.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 5/22/2026 2:03 PM, Dan Cross wrote:
[...]
Are you asking about the technique of using `typedef` and
macros?
Yeah. I was wondering if the macros are okay vs creating stub functions.
But you didn't say that. You just dumped hundreds of lines of code
and said *nothing* about it.
On 5/22/2026 9:41 PM, Tim Rentsch wrote:
cross@spitfire.i.gajendra.net (Dan Cross) writes:
In article <10unkj8$vaik$1@dont-email.me>,
Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
Fwiw, I found some of my old code:
[snip]
...And you felt compelled to post it, why exactly? Did you have
some question about it? Was there some aspect of C you are
unsure of and you need some help?
There are a few people who sometimes post in comp.lang.c (and
perhaps other newsgroups) who are, IMO, never worth reading or
responding to. I'm sorry to say that Chris Thomasson is one of
them.
Shit happens. Fwiw, I have a long history on this group. Here is a fun
one where I posted my region allocator:
https://pastebin.com/raw/f37a23918
https://groups.google.com/g/comp.lang.c/c/7oaJFWKVCTw/m/sSWYU9BUS_QJ
Actually, it's still in use today. It had a fun way to gain alignment
via offsetof.
On 5/23/2026 8:55 PM, Keith Thompson wrote:
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
On 5/22/2026 2:03 PM, Dan Cross wrote:
[...]
Are you asking about the technique of using `typedef` and
macros?
Yeah. I was wondering if the macros are okay vs creating stub functions.
But you didn't say that. You just dumped hundreds of lines of code
and said *nothing* about it.
Yeah, I did, also sorry for the multiposts. My newsgroup server was down today for a while, and god knows how many attempts I made.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,118 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 16:36:58 |
| Calls: | 14,340 |
| Calls today: | 3 |
| Files: | 186,356 |
| D/L today: |
2,558 files (803M bytes) |
| Messages: | 2,532,455 |