Re: Adding thread support for C...



David Hopwood wrote:
Joe Seigh wrote:

Mayan Moudgill wrote:

Joe Seigh wrote:

Mayan Moudgill wrote:

What you won't get is support for writing your own synchronization api's, Not unless you can construct them out of the synchronization functions they give you. Probablly something like the atomic stuff
in JSR 166. You might want to take a look at that.


So what synchronization APIs would you like to see supported?


I deal with various issues depending on what I'm doing at the time.
I don't think it's worth my time trying to formalize what thread support
by C should be given it would take a lot of time and effort.  I don't
think I could counter the agendas others are pushing plus the tendency
of threading api implementors to have a low opinion of other peoples
thread programming skills.  This leads to the deliberate omission of
low level primitives and the inclusion of only the high level api's
favored by the thread api designers.


Those of us who argue against direct use by applications of low-level
primitives dependent on particular machine-level shared memory models,
are not doing so simply because we have plucked an agenda out of thin air.
<some interesting arguments snipped>

I think that one possible answer to your objections is to add the semantics at the _language_ level, and let the compiler (+run-time) take over the responsibility of picking the correct primitives.

There's quite a close analogy between depending on low-level shared
memory primitives, and the kind of direct hardware access, bypassing
the OS, that many MS-DOS programs used to do.

And as is still done in the embedded world. I think you're implicitly assuming:
- performance doesn't matter, because CPUs are powerful enough
- the difference in performance between using low-level APIs and high-level APIs is not significant at the system level.


Neither of these assumptions holds once you start working in the embedded arena.
.




Relevant Pages

  • Re: Adding thread support for C...
    ... What you won't get is support for writing your own synchronization api's, Not unless you can construct them out of the synchronization functions they give you. ... I don't think I could counter the agendas others are pushing plus the tendency of threading api implementors to have a low opinion of other peoples thread programming skills. ... This leads to the deliberate omission of low level primitives and the inclusion of only the high level api's favored by the thread api designers. ...
    (comp.programming.threads)
  • RE: WSE910 error due to time zone differences between client/serve
    ... synchronization problem between service client and server. ... timestamp header in the form of UTC time format. ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Executing a method in a given thread context
    ... As you knoiw, when the callback is run, it is in the context of a ... event in the context of the thread which called Socket.BeginReceive at the ... delivering the message within the correct synchronization context by ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Synchronising two Access-Databases
    ... You may want to concider using replication manager included in Office ... it lets you use indirect synchronization and Internet ... Internet Synchronization with the Microsoft Jet Database Engine: ... Microsoft Online Community Support ...
    (microsoft.public.access.replication)
  • Re: Multiprocessor crash.
    ... not confuse reentrancy with concurrency problems. ... without proper synchronization this code will cause problems. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vc.mfc)