Ignore:
Timestamp:
Mar 4, 2008 2:45:19 PM (16 years ago)
Author:
bennylp
Message:

Ticket #500: Added function to set thread priority in PJLIB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/os.h

    r1601 r1841  
    136136 */ 
    137137PJ_DECL(pj_bool_t) pj_thread_is_registered(void); 
     138 
     139 
     140/** 
     141 * Get thread priority value for the thread. 
     142 * 
     143 * @param thread        Thread handle. 
     144 * 
     145 * @return              Thread priority value, or -1 on error. 
     146 */ 
     147PJ_DECL(int) pj_thread_get_prio(pj_thread_t *thread); 
     148 
     149 
     150/** 
     151 * Set the thread priority. The priority value must be in the priority 
     152 * value range, which can be retrieved with #pj_thread_get_prio_min() and 
     153 * #pj_thread_get_prio_max() functions. 
     154 * 
     155 * @param thread        Thread handle. 
     156 * @param prio          New priority to be set to the thread. 
     157 * 
     158 * @return              PJ_SUCCESS on success or the error code. 
     159 */ 
     160PJ_DECL(pj_status_t) pj_thread_set_prio(pj_thread_t *thread,  int prio); 
     161 
     162/** 
     163 * Get the lowest priority value available for this thread. 
     164 * 
     165 * @param thread        Thread handle. 
     166 * @return              Minimum thread priority value, or -1 on error. 
     167 */ 
     168PJ_DECL(int) pj_thread_get_prio_min(pj_thread_t *thread); 
     169 
     170 
     171/** 
     172 * Get the highest priority value available for this thread. 
     173 * 
     174 * @param thread        Thread handle. 
     175 * @return              Minimum thread priority value, or -1 on error. 
     176 */ 
     177PJ_DECL(int) pj_thread_get_prio_max(pj_thread_t *thread); 
    138178 
    139179 
Note: See TracChangeset for help on using the changeset viewer.