Ignore:
Timestamp:
Aug 21, 2005, 12:08:50 AM (20 years ago)
Author:
bird
Message:

o Protect the fork operations by the means of must complete so

signals won't interrupt us till we're finished. This might leave
unkillable processes around if fork goes highwire.

o Better exception logging during fork.
o Use MMX memcpy in fork (if supported).
o The C function libc_Back_processFork() replaces the pure assembly fork().

Location:
trunk/src/emx/include/InnoTekLIBC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/backend.h

    • Property cvs2svn:cvs-rev changed from 1.28 to 1.29
    r2288 r2289  
    767767
    768768/**
     769 * Fork a child process pretty much identical to the calling process.
     770 * See SuS for full description of what fork() does and doesn't.
     771 *
     772 * @returns 0 in the child process.
     773 * @returns process identifier of the new child in the parent process. (positive, non-zero)
     774 * @returns Negative error code (errno.h) on failure.
     775 */
     776pid_t __libc_Back_processFork(void);
     777
     778/**
    769779 * Waits/polls for on one or more processes to change it's running status.
    770780 *
  • trunk/src/emx/include/InnoTekLIBC/fork.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r2288 r2289  
    3434
    3535/** Current fork version. */
    36 #define __LIBC_FORK_VERSION             0x00010000
     36#define __LIBC_FORK_VERSION             0x00020000
     37
     38/** Current fork module version. */
     39#define __LIBC_FORK_MODULE_VERSION      0x00010000
    3740
    3841/** Timeout on waiting semaphore in fork operations */
     
    272275typedef struct __libc_ForkHandle
    273276{
    274     /** Fork version. */
     277    /** Fork version (__LIBC_FORK_VERSION). */
    275278    unsigned                uVersion;
    276279    /** Parent process, i.e. the one which have called fork(). */
     
    422425     * the front. */
    423426    __LIBC_PFORKCOMPLETIONCALLBACK  papfnCompletionCallbacks;
     427    /** Index of the next completion callback for the parent. */
     428    volatile unsigned       iCompletionCallbackParent;
     429    /** Index of the next completion callback for the child. */
     430    volatile unsigned       iCompletionCallbackChild;
    424431
    425432    /** Pointer to the start of the fork buffer. */
     
    538545typedef struct __libc_ForkModule
    539546{
    540     /** Fork version. */
     547    /** Fork module version (__LIBC_FORK_MODULE_VERSION). */
    541548    unsigned                    uVersion;
    542549    /** Fork callback function.
Note: See TracChangeset for help on using the changeset viewer.