RES: Trying to get Idle Task ID

Wendell Pereira da Silva wendell.silva at compsisnet.com.br
Wed Jan 27 20:33:50 UTC 2010


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.

>From an old (2006) post, I discovered that the Idle task name is a string,
so I tried to cast that string into a rtems_name variable. No way!

So, how can I get the Idle task name or ID? (I'm using RTEMS 4.8.1)

Thanks in advance,


Fabrício de Novaes Kucinskis - DEA / INPE
-----------------------------------------------
Onboard Data Handling Group - SUBORD
Aerospace Electronics Division
Brazilian National Institute for Space Research

_______________________________________________
rtems-users mailing list
rtems-users at rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users
_______________________________________________
rtems-users mailing list
rtems-users at rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users



More information about the users mailing list