rt_List.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*----------------------------------------------------------------------------
  2. * CMSIS-RTOS - RTX
  3. *----------------------------------------------------------------------------
  4. * Name: RT_LIST.H
  5. * Purpose: Functions for the management of different lists
  6. * Rev.: V4.79
  7. *----------------------------------------------------------------------------
  8. *
  9. * Copyright (c) 1999-2009 KEIL, 2009-2017 ARM Germany GmbH. All rights reserved.
  10. *
  11. * SPDX-License-Identifier: Apache-2.0
  12. *
  13. * Licensed under the Apache License, Version 2.0 (the License); you may
  14. * not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at
  16. *
  17. * www.apache.org/licenses/LICENSE-2.0
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  21. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. *---------------------------------------------------------------------------*/
  25. /* Definitions */
  26. /* Values for 'cb_type' */
  27. #define TCB 0U
  28. #define MCB 1U
  29. #define SCB 2U
  30. #define MUCB 3U
  31. #define HCB 4U
  32. /* Variables */
  33. extern struct OS_XCB os_rdy;
  34. extern struct OS_XCB os_dly;
  35. /* Functions */
  36. extern void rt_put_prio (P_XCB p_CB, P_TCB p_task);
  37. extern P_TCB rt_get_first (P_XCB p_CB);
  38. extern void rt_put_rdy_first (P_TCB p_task);
  39. extern P_TCB rt_get_same_rdy_prio (void);
  40. extern void rt_resort_prio (P_TCB p_task);
  41. extern void rt_put_dly (P_TCB p_task, U16 delay);
  42. extern void rt_dec_dly (void);
  43. extern void rt_rmv_list (P_TCB p_task);
  44. extern void rt_rmv_dly (P_TCB p_task);
  45. extern void rt_psq_enq (OS_ID entry, U32 arg);
  46. /* This is a fast macro generating in-line code */
  47. #define rt_rdy_prio(void) (os_rdy.p_lnk->prio)
  48. /*----------------------------------------------------------------------------
  49. * end of file
  50. *---------------------------------------------------------------------------*/