AR# 50314

14.6 SDK BSP - How to use more than 127 semphores in xilkernel_v5_01_a

描述

Xilkernel does not work if the user changes Xilkernel to handle more than 127 semaphores.

For example:

change config_sema->max_sem to 300

How is it possible to get more than 127 semaphores?

解决方案

The issue occurs in the "xilkernel_v5_01_a\src\include\sys\ktypes.h" -> The ID of a semaphore (sem_info_t->sem_id) is a signed char [-128 to 127].

Modifications are required:

1. File ktype.h found in,

<XILINX_EDK>\sw\lib\bsp\xilkernel_v5_01_a\src\include\sys\ktype.h

signed char "sem_id" changed to an integer

2. File semaphore.c found in,

<XILINX_EDK>\sw\lib\bsp\xilkernel_v5_01_a\src\src\ipc\semaphore.c

count variable "i" changed from signed char to an integer.

Note: Any Changes to the Xilkernel are not supported by Xilinx

AR# 50314
日期 11/01/2013
状态 Active
Type 综合文章
Tools More Less