UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 24353

8.2isp2-EDK/XPS- sys_sleep( ) doesn't return correct value in XMK multithread operation.

Description

I am running a simple xilkernel program. I requested sys_sleep( ) for 1000ms in shell_main.

I created a pthread which has a higher priority than shell_main. When I kill this pthread, sys_sleep( ) no longer returns 1000ms. It returns only 500ms.

Solution

This issue will be fixed in EDK 9.1i. For the workaround before the release of this tool, make modifications in the timer.c file as mentioned below. 'timer.c' is in the following location:

<edk_install_dir>\sw\lib\bsp\xilkernel_v3_00_a\src\src\sys

Before:

-----------

int remove_tmr (pid_t pid)

{

int i;

for (i = 0; i < MAX_TMRS; i++) {

if (soft_tmrs[i].pid == pid) {

soft_tmrs[i].pid = -1; // Timer's entry in the active timer list will be silently dropped by the handler

break;

}

}

}

After:

--------

int remove_tmr (pid_t pid)

{

int i;

for (i = 0; i < MAX_TMRS; i++) {

if (soft_tmrs[i].pid == pid) {

soft_tmrs[i].pid = -1; // Timer's entry in the active timer list will be silently dropped by the handler

nactive--;

break;

}

}

}

AR# 24353
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article