Ignore:
Timestamp:
Sep 4, 2004, 8:22:38 AM (21 years ago)
Author:
bird
Message:

Joined with the fork() tree from netlabs.cvs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/os2emx.h

    • Property cvs2svn:cvs-rev changed from 1.17 to 1.18
    r1453 r1454  
    14161416
    14171417
     1418#if 0 /* -pedantic generates annoying warnings here */
    14181419typedef struct _FTIME
    14191420{
     
    14221423  USHORT hours   : 5;
    14231424} FTIME;
     1425#else
     1426typedef struct _FTIME
     1427{
     1428  unsigned twosecs : 5;
     1429  unsigned minutes : 6;
     1430  unsigned hours   : 5;
     1431} FTIME;
     1432#endif
    14241433typedef FTIME *PFTIME;
    14251434
     1435#if 0 /* -pedantic generates annoying warnings here */
    14261436typedef struct _FDATE
    14271437{
     
    14301440  USHORT year  : 7;
    14311441} FDATE;
     1442#else
     1443typedef struct _FDATE
     1444{
     1445  unsigned day   : 5;
     1446  unsigned month : 4;
     1447  unsigned year  : 7;
     1448} FDATE;
     1449#endif
    14321450typedef FDATE *PFDATE;
    14331451
     
    80688086#define MLE_RGB                         1
    80698087
     8088#define MLE_INDEX                       0
     8089#define MLE_RGB                         1
     8090
    80708091#define MLS_WORDWRAP                    0x0001
    80718092#define MLS_BORDER                      0x0002
     
    1331513336
    1331613337
     13338#ifdef INCL_EXAPIS
     13339
     13340/** Allocate memory at given location. */
     13341#define OBJ_LOCATION    0x01000000
     13342/** The allocated memory object should be duplicated/opened in forked process. */
     13343#define OBJ_FORK        0x02000000
     13344
     13345/**
     13346 * Extended DosAllocMem().
     13347 *
     13348 * @returns See DosAllocMem().
     13349 * @param   ppv     Where to store the address of the allocated memory.
     13350 *                  If OBJ_LOCATION is specified in the flFlags *ppv will be the
     13351 *                  address the object must be allocated at.
     13352 * @param   cb      Number of bytes to allocate.
     13353 * @param   flFlags Allocation flags. This API supports the same flags as DosAllocMem()
     13354 *                  but adds OBJ_FORK and OBJ_LOCATION.
     13355 *                  If OBJ_FORK is specified the object will be automatically
     13356 *                  duplicated in the new process.
     13357 *                  If OBJ_LOCATION is specified the object will be allocated
     13358 *                  at the address specified by *ppv.
     13359 * @remark  The memory must be freed with DosFreeMemEx()!
     13360 */
     13361APIRET APIENTRY DosAllocMemEx(PPVOID ppv, ULONG cb, ULONG flFlags);
     13362
     13363/**
     13364 * Extended DosAllocSharedMem().
     13365 *
     13366 * @returns See DosAllocSharedMem().
     13367 * @param   ppv     Where to store the address of the allocated memory.
     13368 * @param   pszName Name of the shared memory. (optional)
     13369 * @param   cb      Number of bytes to allocate.
     13370 * @param   flFlags Allocation flags. This API supports the same flags as DosAllocSharedMem()
     13371 *                  but adds OBJ_FORK.
     13372 *                  If OBJ_FORK is specified the object will be automatically
     13373 *                  be opened in a forked() process.
     13374 * @remark  The memory must be freed with DosFreeMemEx()!
     13375 */
     13376APIRET APIENTRY DosAllocSharedMemEx(PPVOID ppv, PCSZ pszName, ULONG cb, ULONG flFlags);
     13377
     13378/**
     13379 * Extended DosGetSharedMem().
     13380 *
     13381 * @returns See DosGetSharedMem().
     13382 * @param   pv      The address of the shared memory.
     13383 * @param   flFlags Allocation flags. This API supports the same flags as DosGetSharedMem()
     13384 *                  but adds OBJ_FORK. If OBJ_FORK is specified the object will
     13385 *                  be automatically be opened in a forked() process.
     13386 * @remark  The memory must be freed with DosFreeMemEx()!
     13387 */
     13388APIRET APIENTRY DosGetSharedMemEx(PVOID pv, ULONG flFlags);
     13389
     13390/**
     13391 * Extended DosGetNamedSharedMem().
     13392 *
     13393 * @returns See DosGetNamedSharedMem().
     13394 * @param   pv      The address of the shared memory.
     13395 * @param   flFlags Allocation flags. This API supports the same flags as DosGetNamedSharedMem()
     13396 *                  but adds OBJ_FORK. If OBJ_FORK is specified the object will
     13397 *                  be automatically be opened in a forked() process.
     13398 * @remark  The memory must be freed with DosFreeMemEx()!
     13399 */
     13400APIRET APIENTRY DosGetNamedSharedMemEx(PPVOID ppv, PCSZ pszName, ULONG flFlags);
     13401
     13402/**
     13403 * Free memory allocated by DosAllocMemEx.
     13404 *
     13405 * @returns See DosFreeMem().
     13406 * @param   pv  Address of the memory to free.
     13407 */
     13408APIRET APIENTRY DosFreeMemEx(PVOID pv);
     13409
     13410/**
     13411 * Extended DosCreateEventSem() which will make sure the created semaphore is
     13412 * opened in a forked process with the same handle.
     13413 */
     13414APIRET APIENTRY DosCreateEventSemEx(PSZ pszName, PHEV phev, ULONG flAttr, BOOL32 fState);
     13415/**
     13416 * Extended DosCreateMutexSem() which will make sure the created semaphore is
     13417 * opened in a forked process with the same handle.
     13418 */
     13419APIRET APIENTRY DosCreateMutexSemEx(PSZ pszName, PHMTX phmtx, ULONG flAttr, BOOL32 fState);
     13420/**
     13421 * Extended DosOpenEventSem() which will make sure the opened semaphore is
     13422 * opened in a forked process with the same handle.
     13423 */
     13424APIRET APIENTRY DosOpenEventSemEx(PSZ pszName, PHEV phev);
     13425/**
     13426 * Extended DosOpenMutexSem() which will make sure the opened semaphore is
     13427 * opened in a forked process with the same handle.
     13428 */
     13429APIRET APIENTRY DosOpenMutexSemEx(PSZ pszName, PHMTX phmtx);
     13430/**
     13431 * Close semaphore opened or created using the extended APIs.
     13432 * @returns see DosCloseMutexSem().
     13433 * @param   hmtx    Handle to the mutex semaphore which is to be closed.
     13434 */
     13435APIRET APIENTRY DosCloseMutexSemEx(HMTX hmtx);
     13436/**
     13437 * Close semaphore opened or created using the extended APIs.
     13438 * @returns see DosCloseEventSem().
     13439 * @param   hev     Handle to the event semaphore which is to be closed.
     13440 */
     13441APIRET APIENTRY DosCloseEventSemEx(HEV hev);
     13442
     13443#ifdef INCL_EXAPIS_MAPPINGS
     13444
     13445#define DosAllocMem(a, b, c)       DosAllocMemEx((a),(b),(c) | OBJ_FORK)
     13446#define DosAllocSharedMem(a,b,c,d) DosAllocSharedMemEx((a),(b),(c),(d) | OBJ_FORK)
     13447#define DosFreeMem(a)              DosFreeMemEx((a))
     13448
     13449#define DosCreateMutexSem(a,b,c,d) DosCreateMutexSemEx((a),(b),(c),(d))
     13450#define DosCreateEventSem(a,b,c,d) DosCreateEventSemEx((a),(b),(c),(d))
     13451#define DosOpenMutexSem(a,b)       DosOpenMutexSemEx((a),(b))
     13452#define DosOpenEventSem(a,b)       DosOpenEventSemEx((a),(b))
     13453#define DosCloseMutexSem(a)        DosCloseMutexSemEx((a))
     13454#define DosCloseEventSem(a)        DosCloseEventSemEx((a))
     13455
     13456#endif /* INCL_EXAPIS_MAPPINGS */
     13457
     13458
     13459#endif /* INCL_EXAPIS */
     13460
     13461
    1331713462/* ------------------------------ THE END --------------------------------- */
    1331813463
Note: See TracChangeset for help on using the changeset viewer.