Re: no free functions?!



nicolas.edel@xxxxxxxxx wrote:
On 14 mai, 12:53, Georg Bauhaus <rm.dash-bauh...@xxxxxxxxxxxxx> wrote:
E.g., the errno variable and
similar variables are connected to the funcions by
man pages only; try using them reliably in multithreaded
programs.

What's the problem with using errno reliably in multithreaded
programs ? Any decent libc implementation support that quite well
using TLS and dereference :

bits/errno.h:42:# define errno (*__errno_location ())

Actually, you are proving my point: While shared variables are
not available as a C concept, TLS provides exactly the modular
setup to which I had been referring[*]; you don't see the
modularization, though. Alas, for C use, TLS is a non-portable
OS-concept, and "thread" it is not built into the language
and therefore no information for the C compiler. Eiffel,
properly implemented, has support for concurrent and parallel
programming built in via "separate" and associated semantics
(see e.g. SCOOP).

Multiprogramming looks like an old concept, and languages older
than C and cousins have typically supported multiple threads and
shared variable protection right in the language. Luckily, some of
this old wisdom will now be preserved because the multicore CPUs
provide an incentive to again become familiar with semaphores,
monitors, CSP, etc..

[*] errno is just a good example for the more general shared
variable that needs protection from concurrent access. It hadn't
always been a matter of course for a C library to be thread
safe!
.



Relevant Pages

  • Re: various objects in my VB6 project - Calling IUnknown
    ... legacy support for EXEs is an order of scale beyond ... "Language Stability" enjoyably employs structure. ... But I'm not black and white on the matter of migration changes. ...
    (microsoft.public.vb.general.discussion)
  • Re: Architectural support for programming languages
    ... microarchitectural support in processors for operating systems to make ... The language used will match the programs, ... were adding architectural features to take their share of new market ... and run them under and OS written in C and on architecture with all ...
    (comp.arch)
  • RE: cannot import data manually on sql server 2005 because of collatio
    ... Your original collation of your SQL Server 2000 database is a Windows ... and this requires that the related language and locale must be ... Options, click on Languages tab, in Supplemental language support box, ...
    (microsoft.public.sqlserver.dts)
  • Re: how is Haskell not robust?
    ... Haskell has not reached critical mass. ... have a thousand packages but still poor support for mainstream package ... If anyone would make money with the language or a compiler ...
    (comp.lang.functional)
  • Re: Why should I eschew prototype.js?
    ... Microsoft drives this market, whether people admit it or not. ... out next week and proclaimed "The only markup language we will support ... Furthermore, if any other attributes are present, IE will ignore the script block. ...
    (comp.lang.javascript)