--- Adam Megacz <mingw@...> wrote: >
> Danny Smith <danny_r_smith_2001@...> writes:
> > > Do both crtdll and msvcrt provide implementations of the 'standard'
> > > Win32 API functions like CreateThread(), WriteFile(), etc?
> > Both provide "standard" C-runtime functions. The functions you name
> > are in W32api dlls like kernel32.dll and users32.dll. Many of the
> > C-runtime funcs do indeed call the W32api layer, wrapping them in locks
> > ensure thread safety.
> Oh, nice.
> Is there somewhere where I can find out which functions belong to
> msvcrt, which belong to crtdll, and which belong to other dll's?
Download the mingw runtime src and look at the .def files used to build the
import libs. Rule of thumb: w32api func names usually written in WriteFile
style (ie with uppercase). Exceptions occur in the winsock api which uses
many standard (BSD) names. The w32api defs are, you guessed it, in the
w32api source distro.
> all the stuff in winnt.h is from neither msvcrt nor crtdll, then
> mingw-gcj might get away with not depending on *either* DLL (which
> would be ideal).
> Is the w32api layer itself thread-safe?
In other words, if two threads
> try to write to the same file descriptor with WriteFile(), is there
> any risk of trouble?
Yes. You need to provide your own locks/unlocks for the file handle.
> - a
> "If I put copyrighted material into the 'chewy nougat center', I can
> claim the crunchy chocolate coating is an 'Access Control
> Mechanism'." --lynx_user_abroad
> Why Windows NT/2k/XP is unreliable: http://www.zappadoodle.com
> MinGW-dvlpr mailing list
http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.