[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RES: Trying to get Idle Task ID



Urrgh! Sorry...
I got the same behavior observed by you. (3, 0) = (RTEMS_INVALID_NAME, 0).

The mystery continues...

Wendell.


-----Mensagem original-----
De: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org] Em nome de Wendell Pereira da Silva
Enviada em: quarta-feira, 27 de janeiro de 2010 17:29
Para: 'Fabr?cio de Novaes Kucinskis'; 'RTEMS Users'
Assunto: RES: Trying to get Idle Task ID


Hi Fabricio,

I got something even strange. 

I tried here the following code:

rtems_id id;
rtems_status_code lenStatus =
	rtems_task_ident(
	rtems_build_name('I','D','L','E'),
	RTEMS_SEARCH_ALL_NODES, &id);

printk("%d, %d\n", lenStatus, id);


I got RTEMS_SUCCESSUL and id == 0 (zero).
But when id == 0, it is supposed to be RTEMS_SELF!

Could anyone else help us?

BSP: sparc/erc32
RTEMS_VERSION=4.8.1

Att.
Wendell.


-----Mensagem original-----
De: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org] Em nome de Fabr?cio de Novaes Kucinskis
Enviada em: quarta-feira, 27 de janeiro de 2010 16:33
Para: 'RTEMS Users'
Assunto: Trying to get Idle Task ID

Hi all,

I'm trying to get the total amount of time used by any task (in
microseconds) as an unsigned long value that I can insert in a telemetry
packet. 

For this purpose, my code is based on "rtems_cpu_usage_report_with_plugin",
and, AFAICT, it works correctly.

The function receives the task ID, loops through the Objects Information
Table, identifies the correct task and gets the amount of time.

The problem is that I cannot get the Idle task ID. I tried
"rtems_task_ident(rtems_build_name('I', 'D', 'L', 'E'))", but I receive an
"RTEMS_INVALID_NAME" error. I tried with "idle" and "Idle", with no results.
I also tried a constant from the CPU Usage chapter in the RTEMS C Users
Manual, "0x0401001", and got the same error.