Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @file IxOsalOsThread.c (eCos) |
| 3 | * |
| 4 | * @brief OS-specific thread implementation. |
| 5 | * |
| 6 | * |
| 7 | * @par |
| 8 | * IXP400 SW Release version 1.5 |
| 9 | * |
| 10 | * -- Copyright Notice -- |
| 11 | * |
| 12 | * @par |
| 13 | * Copyright 2001-2005, Intel Corporation. |
| 14 | * All rights reserved. |
| 15 | * |
| 16 | * @par |
| 17 | * Redistribution and use in source and binary forms, with or without |
| 18 | * modification, are permitted provided that the following conditions |
| 19 | * are met: |
| 20 | * 1. Redistributions of source code must retain the above copyright |
| 21 | * notice, this list of conditions and the following disclaimer. |
| 22 | * 2. Redistributions in binary form must reproduce the above copyright |
| 23 | * notice, this list of conditions and the following disclaimer in the |
| 24 | * documentation and/or other materials provided with the distribution. |
| 25 | * 3. Neither the name of the Intel Corporation nor the names of its contributors |
| 26 | * may be used to endorse or promote products derived from this software |
| 27 | * without specific prior written permission. |
| 28 | * |
| 29 | * @par |
| 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' |
| 31 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 32 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 33 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
| 34 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 35 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 36 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 37 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 38 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 39 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 40 | * SUCH DAMAGE. |
| 41 | * |
| 42 | * @par |
| 43 | * -- End of Copyright Notice -- |
| 44 | */ |
| 45 | |
| 46 | #include "IxOsal.h" |
| 47 | |
| 48 | /* Thread attribute is ignored */ |
| 49 | PUBLIC IX_STATUS |
| 50 | ixOsalThreadCreate (IxOsalThread * ptrTid, |
| 51 | IxOsalThreadAttr * threadAttr, IxOsalVoidFnVoidPtr entryPoint, void *arg) |
| 52 | { |
| 53 | return IX_SUCCESS; |
| 54 | } |
| 55 | |
| 56 | /* |
| 57 | * Start thread after given its thread handle |
| 58 | */ |
| 59 | PUBLIC IX_STATUS |
| 60 | ixOsalThreadStart (IxOsalThread * tId) |
| 61 | { |
| 62 | /* Thread already started upon creation */ |
| 63 | return IX_SUCCESS; |
| 64 | } |
| 65 | |
| 66 | /* |
| 67 | * In Linux threadKill does not actually destroy the thread, |
| 68 | * it will stop the signal handling. |
| 69 | */ |
| 70 | PUBLIC IX_STATUS |
| 71 | ixOsalThreadKill (IxOsalThread * tid) |
| 72 | { |
| 73 | return IX_SUCCESS; |
| 74 | } |
| 75 | |
| 76 | PUBLIC void |
| 77 | ixOsalThreadExit (void) |
| 78 | { |
| 79 | } |
| 80 | |
| 81 | PUBLIC IX_STATUS |
| 82 | ixOsalThreadPrioritySet (IxOsalOsThread * tid, UINT32 priority) |
| 83 | { |
| 84 | return IX_SUCCESS; |
| 85 | } |
| 86 | |
| 87 | PUBLIC IX_STATUS |
| 88 | ixOsalThreadSuspend (IxOsalThread * tId) |
| 89 | { |
| 90 | return IX_SUCCESS; |
| 91 | |
| 92 | } |
| 93 | |
| 94 | PUBLIC IX_STATUS |
| 95 | ixOsalThreadResume (IxOsalThread * tId) |
| 96 | { |
| 97 | return IX_SUCCESS; |
| 98 | } |