Changeset 1461 for trunk/src/emx/include


Ignore:
Timestamp:
Sep 6, 2004, 6:22:46 AM (21 years ago)
Author:
bird
Message:

Fixing, extending, optimizing.

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

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1460 r1461  
    494494    /* Priority of this callback */
    495495    unsigned                uPriority;
    496     /** Pointer to the next record in a sorted callback list.
    497      * @remark This is initialized to point to self in order to shut up the compiler.
    498      * (Encountered some limitations of the GNU inline assmebler which prevents me from
    499      * referencing the symbol.)
    500      */
    501     struct __libc_ForkCallback *pNext;
     496    /** Pointer to self.
     497     * This is a hack to allow the callbacks to be static without gcc
     498     * optimizing them away as unused.
     499     */
     500    const struct __libc_ForkCallback *pSelf;
    502501} __LIBC_FORKCALLBACK, *__LIBC_PFORKCALLBACK;
    503502
     
    513512 */
    514513#define _FORK_PARENT1(uPriority, pfnCallback) \
    515     static __LIBC_FORKCALLBACK __fork_parent1_##pfnCallback = { pfnCallback, uPriority, &__fork_parent1_##pfnCallback }; \
     514    static const __LIBC_FORKCALLBACK __fork_parent1_##pfnCallback = { pfnCallback, uPriority, &__fork_parent1_##pfnCallback }; \
    516515    __asm__ (".stabs \"___fork_parent1__\", 25, 0, 0, ___fork_parent1_" #pfnCallback);
    517516
     
    526525 */
    527526#define _FORK_CHILD1(uPriority, pfnCallback) \
    528     static __LIBC_FORKCALLBACK __fork_child1_##pfnCallback  = { pfnCallback, uPriority, &__fork_child1_##pfnCallback  }; \
     527    static const __LIBC_FORKCALLBACK __fork_child1_##pfnCallback  = { pfnCallback, uPriority, &__fork_child1_##pfnCallback  }; \
    529528    __asm__ (".stabs \"___fork_child1__\",  25, 0, 0, ___fork_child1_" #pfnCallback );
    530529
  • trunk/src/emx/include/InnoTekLIBC/sharedpm.h

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r1460 r1461  
    233233    /** Pointer to fork handle which a child should use when spawned by fork(). */
    234234    void                       *pvForkHandle;
     235    /** Creation timestamp. */
     236    unsigned                    uTimestamp;
    235237
    236238    /** Reserved pool pointer field with default value 0. */
    237     unsigned                    aReserved[40 - 13];
     239    unsigned                    aReserved[40 - 14];
    238240
    239241    /** Number of possible pointers to shared memory starting at pvInherit.
     
    243245    /** Pointer to data inherited from the parent process. */
    244246    __LIBC_PSPMINHERIT volatile pInherit;
     247    /** Pointer to data inherited from the parent process when it's locked.
     248     * When locked pInherit is NULL and this member points to the data instead.
     249     * This prevents spmAlloc() from reclaiming it while it's in use. */
     250    __LIBC_PSPMINHERIT volatile pInheritLocked;
    245251} __LIBC_SPMPROCESS, *__LIBC_PSPMPROCESS;
    246252
     
    367373
    368374/**
     375 * Gets the inherit data associated with the current process.
     376 * This call prevents it from being release by underrun handling.
     377 *
     378 * @returns Pointer to inherit data.
     379 *          The caller must call __libc_spmInheritRelease() when done.
     380 * @returns NULL and errno if no inherit data.
     381 */
     382__LIBC_PSPMINHERIT  __libc_spmInheritRequest(void);
     383
     384/**
     385 * Releases the inherit data locked by the __libc_spmInheritRequest() call.
     386 *
     387 * @returns 0 on success.
     388 * @returns -1 and errno on failure.
     389 */
     390int  __libc_spmInheritRelease(void);
     391
     392/**
     393 * Frees the inherit data of this process.
     394 * This is called when the executable is initialized.
     395 */
     396void  __libc_spmInheritFree(void);
     397
     398/**
    369399 * Create an embryo related to the current process.
    370400 *
Note: See TracChangeset for help on using the changeset viewer.