• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 // -*- c++ -*-
19 
20 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
21 
22 
23 
24 //                  OSCL_T H R E A D (T H R E A D  I M P L E M E N T A T I O N)
25 
26 
27 
28 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
29 
30 
31 
32 /*! \file oscl_thread.h .This file provides THREAD implementation that can be ported
33 
34 to three OS LINUX, SYMBIAN, WIN32
35 
36 */
37 
38 
39 
40 
41 
42 #ifndef OSCL_PROCSTATUS_H_INCLUDED
43 
44 #define OSCL_PROCSTATUS_H_INCLUDED
45 
46 
47 
48 /**
49 
50  * Class OsclProcStatus
51 
52  */
53 
54 class OsclProcStatus
55 {
56 
57 
58 
59 
60 
61     public:
62 
63 
64 
65 // Enumerated Error values
66 
67 
68 
69         /**
70 
71          * List of enums which contain error codes
72 
73          */
74 
75         enum eOsclProcError
76         {
77             SUCCESS_ERROR = 0,                  // Function returned succesfully
78             OTHER_ERROR,                        // Function returned some error
79             TOO_MANY_THREADS_ERROR,             // Cannot create another thread
80             BAD_THREADID_ADDR_ERROR,            // The address for the thread id is not correct
81             MAX_THRDS_REACHED_ERROR,            // No more threads can be created in the system
82             INVALID_THREAD_ID_ERROR,            // Invalid thread identifier
83             NOT_ENOUGH_MEMORY_ERROR,            // Not enough storage is available to process this command
84             OUTOFMEMORY_ERROR,                  // Not enough storage is available to complete this operation
85             NOT_ENOUGH_RESOURCES_ERROR,         // Not Enough resources available
86             THREAD_1_INACTIVE_ERROR,            // The signal handler cannot be set
87             ALREADY_SUSPENDED_ERROR,            // Thread is already suspended
88             NOT_SUSPENDED_ERROR,                // Thread cannot be suspended
89             INVALID_THREAD_ERROR,               // Referring to invalid thread
90             INVALID_PARAM_ERROR,                // Invalid parameter passed in the API
91             NO_PERMISSION_ERROR,                // Operation not permitted
92             INVALID_PRIORITY_ERROR,             // Priority is not a valid OSCL priority
93             PSHARED_NOT_ZERO_ERROR,             // Trying to create global semaphore
94             EXCEED_MAX_COUNT_VARIABLE_ERROR,    // Exceeding maximum possible value for semaphore count
95             THREAD_BLOCK_ERROR,                 // Thread is blocked
96             EXCEED_MAX_SEM_COUNT_ERROR,         // Out of range of semaphore count
97             INVALID_HANDLE_ERROR,               // Invalid handle
98             INVALID_OPERATION_ERROR,            // Invalid operation
99             INVALID_FUNCTION_ERROR,
100             INVALID_ACCESS_ERROR,
101             INVALID_ARGUMENT_ERROR,
102             SYSTEM_RESOURCES_UNAVAILABLE_ERROR,
103             INVALID_POINTER_ERROR,
104             RELOCK_MUTEX_ERROR,
105             THREAD_NOT_OWN_MUTEX_ERROR,
106             MUTEX_LOCKED_ERROR,
107             WAIT_ABANDONED_ERROR,//thread terminated while waiting
108             WAIT_TIMEOUT_ERROR, //timed wait expired without acquiring
109             SEM_NOT_SIGNALED_ERROR, //trywait returned without acquiring
110             PSHARED_ATTRIBUTE_SETTING_ERROR,   // Error at setting pthread attributes
111             NOT_IMPLEMENTED //function not implemented on this platform.
112         } ;
113 
114 
115 
116 };
117 
118 
119 
120 #endif
121 
122