Mail Archives: djgpp-workers/1999/04/15/13:34:19
Bonjour M. Eli Zaretskii
>
> On Wed, 14 Apr 1999, Alain Magloire wrote:
>
> > Is there major projects ahead for the core DJGPP/libc ?
>
> IMHO, you just covered about everything. There are quite a few minor
> features and improvements, but I can't think of any other major ones.
>
There are a couple of others but some may not mean much in a single task
environment.
Virtual Memory, file mapping :
mmap(), munmap(), mlock(), mlockall() ,...
IPC: semaphores, message queues, shared memory
Maybe only usefull with some multitasking even if crude/raw/minimalist.
Asynch I/O.
> But I guess we didn't discuss this for a very long time, so now might
> be as good as ever. If anybody has more missing features in mind,
> please speak up (and don't forget to volunteer to implement some ;-).
>
Threading is an interesting topic :
- There's the ubiquitous ``errno''.
- stdio API :
- void flockfile(FILE *);
- int ftrylockfile(File *);
- void funlockfile(FILE *);
- int getc_unlocked(FILE *);
- int getc_unlocked(void);
- int putc_unlocked(int, File *);
- int putchar_unlocked(int);
So some functions should grab the lock stream before.
For example if fflush() is not thread-safe
int fflush(FILE * stream)
{
if (stream) {
flockfile(stream);
.....
funlockfile(stream);
}
...
}
- C lib reentrant interface :
- getlogin_r
- readir_r
- strtock_r
- asctime_r
- ctime_r
- gmtime_r
- localtime_r
- rand_r
- getgrpid_r
- getgrnam_r
- getpwuid_r
- getpwnam_r
- Audit the src some funcs may be implemented in non-thread safe manner.
malloc/calloc/realloc/free comes to mind.
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!
- Raw text -