| 1 | /* $Id: backend.h 1287 2004-03-11 03:05:55Z bird $ */
|
|---|
| 2 | /** @file
|
|---|
| 3 | *
|
|---|
| 4 | * LIBC - Backend header.
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright (c) 2004 knut st. osmundsen <[email protected]>
|
|---|
| 7 | *
|
|---|
| 8 | *
|
|---|
| 9 | * This file is part of InnoTek LIBC.
|
|---|
| 10 | *
|
|---|
| 11 | * InnoTek LIBC is free software; you can redistribute it and/or modify
|
|---|
| 12 | * it under the terms of the GNU General Public License as published by
|
|---|
| 13 | * the Free Software Foundation; either version 2 of the License, or
|
|---|
| 14 | * (at your option) any later version.
|
|---|
| 15 | *
|
|---|
| 16 | * InnoTek LIBC is distributed in the hope that it will be useful,
|
|---|
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 19 | * GNU General Public License for more details.
|
|---|
| 20 | *
|
|---|
| 21 | * You should have received a copy of the GNU General Public License
|
|---|
| 22 | * along with InnoTek LIBC; if not, write to the Free Software
|
|---|
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 24 | *
|
|---|
| 25 | */
|
|---|
| 26 |
|
|---|
| 27 | #ifndef __InnoTekLIBC_backend_h__
|
|---|
| 28 | #define __InnoTekLIBC_backend_h__
|
|---|
| 29 |
|
|---|
| 30 | #ifndef __LIBC_THREAD_DECLARED
|
|---|
| 31 | #define __LIBC_THREAD_DECLARED
|
|---|
| 32 | typedef struct __libc_thread *__LIBC_PTHREAD, **__LIBC_PPTHREAD;
|
|---|
| 33 | #endif
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | /** @group __libc_Back_thread LIBC Backend - Threads
|
|---|
| 37 | * @{ */
|
|---|
| 38 |
|
|---|
| 39 | /**
|
|---|
| 40 | * Initiatlize a new thread structure.
|
|---|
| 41 | *
|
|---|
| 42 | * @param pThrd Pointer to the thread structure.
|
|---|
| 43 | */
|
|---|
| 44 | void __libc_Back_threadInit(__LIBC_PTHREAD pThrd);
|
|---|
| 45 |
|
|---|
| 46 | /**
|
|---|
| 47 | * Called before the thread structure is freed so the backend
|
|---|
| 48 | * can cleanup its members.
|
|---|
| 49 | *
|
|---|
| 50 | * @param pThrd Pointer to the thread in question.
|
|---|
| 51 | */
|
|---|
| 52 | void __libc_Back_threadCleanup(__LIBC_PTHREAD pThrd);
|
|---|
| 53 |
|
|---|
| 54 | /**
|
|---|
| 55 | * Called in the context of the newly started thread to register
|
|---|
| 56 | * exception handler and to do other init stuff.
|
|---|
| 57 | *
|
|---|
| 58 | * @param pExpRegRec Exception handler registration record on the stack.
|
|---|
| 59 | * To be used for any exception handler registration.
|
|---|
| 60 | */
|
|---|
| 61 | void __libc_Back_threadStartup(void *pExpRegRec);
|
|---|
| 62 |
|
|---|
| 63 | /**
|
|---|
| 64 | * Called in the context of the thread which is to be terminated to
|
|---|
| 65 | * unregister exception handler and to do other final term stuff.
|
|---|
| 66 | *
|
|---|
| 67 | * @param pExpRegRec Exception handler registration record on the stack.
|
|---|
| 68 | * To be used for any exception handler registration.
|
|---|
| 69 | * @remark This is called after __libc_Back_threadCleanup().
|
|---|
| 70 | * @remark It is not called by thread which calls _endthread(), nor for the
|
|---|
| 71 | * main thread.
|
|---|
| 72 | */
|
|---|
| 73 | void __libc_Back_threadEnd(void *pExpRegRec);
|
|---|
| 74 |
|
|---|
| 75 | /** @} */
|
|---|
| 76 |
|
|---|
| 77 | #if defined (__cplusplus)
|
|---|
| 78 | }
|
|---|
| 79 | #endif
|
|---|
| 80 |
|
|---|
| 81 | #endif /* not _EMX_SYSCALLS_H */
|
|---|