Author Topic: TI-Nspire Task Manager  (Read 14054 times)

0 Members and 1 Guest are viewing this topic.

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: TI-Nspire Task Manager
« Reply #15 on: March 19, 2013, 12:26:39 pm »
Keep on flexing your muscles. So far so good. ;)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI-Nspire Task Manager
« Reply #16 on: March 19, 2013, 12:57:12 pm »
Nice stuff. That reminds me, is it possible on the Nspire to have multiple BASIC or Lua documents open simultaneously? Also are there often background tasks starting randomly like on a computer like Windows update?

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: TI-Nspire Task Manager
« Reply #17 on: March 20, 2013, 05:04:32 am »
Nice stuff. That reminds me, is it possible on the Nspire to have multiple BASIC or Lua documents open simultaneously? Also are there often background tasks starting randomly like on a computer like Windows update?
You can have multiple Lua apps open by putting one on each page if that's what you mean. And I'm curious about random tasks as well :) (I'll go on a killing spree this afternoon to see what each process does when killed :P)

Some people need a high five in the face... with a chair.
~EC

Offline excale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +19/-1
    • View Profile
Re: TI-Nspire Task Manager
« Reply #18 on: March 20, 2013, 12:32:01 pm »
Updated for CAS again :) :
Code: [Select]
#ifndef SYSCALLS_H
#define SYSCALLS_H

/* Tasks */

static const unsigned int tcf_established_tasks_addrs[] = { 0x102F0C1C, 0x102F1348, 0x0, 0x0 };
#define TCF_Established_Tasks SYSCALL_CUSTOM(tcf_established_tasks_addrs, unsigned, void)

static const unsigned int tcc_current_task_pointer_addrs[] = { 0x102EFBF4, 0x102F0320, 0x0, 0x0 };
#define TCC_Current_Task_Pointer SYSCALL_CUSTOM(tcc_current_task_pointer_addrs, void*, void)

static const unsigned int tcf_task_information_addrs[] = { 0x102F0D10, 0x102F143C, 0x0, 0x0 };
#define TCF_Task_Information SYSCALL_CUSTOM(tcf_task_information_addrs, int, void*, char*, unsigned char*, unsigned*, unsigned char*, unsigned char*, unsigned*, void**, unsigned*, unsigned*)

static const unsigned int tcf_task_pointers_addrs[] = { 0x102F0E80, 0x102F15AC, 0x0, 0x0 };
#define TCF_Task_Pointers SYSCALL_CUSTOM(tcf_task_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int tcc_terminate_task_addrs[] = { 0x102F06C0, 0x102F0DEC, 0x0, 0x0 };
#define TCC_Terminate_Task SYSCALL_CUSTOM(tcc_terminate_task_addrs, unsigned, void*)

/* Dynamic memory */

static const unsigned int dmf_established_memory_pools_addrs[] = { 0x10273948, 0x10274074, 0x0, 0x0 };
#define DMF_Established_Memory_Pools SYSCALL_CUSTOM(dmf_established_memory_pools_addrs, unsigned, void)

static const unsigned int dmf_memory_pool_information_addrs[] = { 0x10273960, 0x1027408C, 0x0, 0x0 };
#define DMF_Memory_Pool_Information SYSCALL_CUSTOM(dmf_memory_pool_information_addrs, unsigned, void*, char*, void**, unsigned*, unsigned*, unsigned*, unsigned char*, unsigned*, void*)

static const unsigned int dmf_memory_pool_pointers_addrs[] = { 0x10273A6C, 0x10274198, 0x0, 0x0 };
#define DMF_Memory_Pool_Pointers SYSCALL_CUSTOM(dmf_memory_pool_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int dmc_delete_memory_pool_addrs[] = { 0x10277C28, 0x10278354, 0x0, 0x0 };
#define DMC_Delete_Memory_Pool SYSCALL_CUSTOM(dmc_delete_memory_pool_addrs, unsigned, void*)

/* Event groups */

static const unsigned int evf_established_event_groups_addrs[] = { 0x103D0284, 0x103D09B4, 0x0, 0x0 };
#define EVF_Established_Event_Groups SYSCALL_CUSTOM(evf_established_event_groups_addrs, unsigned, void)

static const unsigned int evf_event_group_information_addrs[] = { 0x103D029C, 0x103D09CC, 0x0, 0x0 };
#define EVF_Event_Group_Information SYSCALL_CUSTOM(evf_event_group_information_addrs, unsigned, void*, char*, unsigned*, unsigned*, void**)

static const unsigned int evf_event_group_pointers_addrs[] = { 0x103D036C, 0x103D0A9C, 0x0, 0x0 };
#define EVF_Event_Group_Pointers SYSCALL_CUSTOM(evf_event_group_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int evc_delete_event_group_addrs[] = { 0x10273E84, 0x102745B0, 0x0, 0x0 };
#define EVC_Delete_Event_Group SYSCALL_CUSTOM(evc_delete_event_group_addrs, unsigned, void*)

/* Queues */

static const unsigned int quf_established_queues_addrs[] = { 0x1027685C, 0x10276F88, 0x0, 0x0 };
#define QUF_Established_Queues SYSCALL_CUSTOM(quf_established_queues_addrs, unsigned, void)

static const unsigned int quf_queue_information_addrs[] = { 0x10276874, 0x10276FA0, 0x0, 0x0 };
#define QUF_Queue_Information SYSCALL_CUSTOM(quf_queue_information_addrs, unsigned, void*, char*, void**, unsigned*, unsigned*, unsigned*, unsigned char*, unsigned*, unsigned char*, unsigned*, void**)

static const unsigned int quf_queue_pointers_addrs[] = { 0x102769AC, 0x102770D8, 0x0, 0x0 };
#define QUF_Queue_Pointers SYSCALL_CUSTOM(quf_queue_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int quc_delete_queue_addrs[] = { 0x1027671C, 0x10276E48, 0x0, 0x0 };
#define QUC_Delete_Queue SYSCALL_CUSTOM(quc_delete_queue_addrs, unsigned, void*)

static const unsigned int quc_receive_from_queue_addrs[] = { 0x10275AC0, 0x102761EC, 0x0, 0x0 };
#define QUC_Receive_From_Queue SYSCALL_CUSTOM(quc_receive_from_queue_addrs, unsigned, void*, void*, unsigned, unsigned*, unsigned)

#endif

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: TI-Nspire Task Manager
« Reply #19 on: March 20, 2013, 12:37:04 pm »
Thanks again :)

Offline excale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +19/-1
    • View Profile
Re: TI-Nspire Task Manager
« Reply #20 on: March 20, 2013, 12:56:33 pm »
Nspire CX CAS:
Code: [Select]
#ifndef SYSCALLS_H
#define SYSCALLS_H

/* Tasks */

static const unsigned int tcf_established_tasks_addrs[] = { 0x102F0C1C, 0x102F1348, 0x0, 0x102F0E18 };
#define TCF_Established_Tasks SYSCALL_CUSTOM(tcf_established_tasks_addrs, unsigned, void)

static const unsigned int tcc_current_task_pointer_addrs[] = { 0x102EFBF4, 0x102F0320, 0x0, 0x102EFDF0 };
#define TCC_Current_Task_Pointer SYSCALL_CUSTOM(tcc_current_task_pointer_addrs, void*, void)

static const unsigned int tcf_task_information_addrs[] = { 0x102F0D10, 0x102F143C, 0x0, 0x102F0F0C };
#define TCF_Task_Information SYSCALL_CUSTOM(tcf_task_information_addrs, int, void*, char*, unsigned char*, unsigned*, unsigned char*, unsigned char*, unsigned*, void**, unsigned*, unsigned*)

static const unsigned int tcf_task_pointers_addrs[] = { 0x102F0E80, 0x102F15AC, 0x0, 0x102F107C };
#define TCF_Task_Pointers SYSCALL_CUSTOM(tcf_task_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int tcc_terminate_task_addrs[] = { 0x102F06C0, 0x102F0DEC, 0x0, 0x102F08BC };
#define TCC_Terminate_Task SYSCALL_CUSTOM(tcc_terminate_task_addrs, unsigned, void*)

/* Dynamic memory */

static const unsigned int dmf_established_memory_pools_addrs[] = { 0x10273948, 0x10274074, 0x0, 0x10273B48 };
#define DMF_Established_Memory_Pools SYSCALL_CUSTOM(dmf_established_memory_pools_addrs, unsigned, void)

static const unsigned int dmf_memory_pool_information_addrs[] = { 0x10273960, 0x1027408C, 0x0, 0x10273B60 };
#define DMF_Memory_Pool_Information SYSCALL_CUSTOM(dmf_memory_pool_information_addrs, unsigned, void*, char*, void**, unsigned*, unsigned*, unsigned*, unsigned char*, unsigned*, void*)

static const unsigned int dmf_memory_pool_pointers_addrs[] = { 0x10273A6C, 0x10274198, 0x0, 0x10273C6C };
#define DMF_Memory_Pool_Pointers SYSCALL_CUSTOM(dmf_memory_pool_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int dmc_delete_memory_pool_addrs[] = { 0x10277C28, 0x10278354, 0x0, 0x10277E28 };
#define DMC_Delete_Memory_Pool SYSCALL_CUSTOM(dmc_delete_memory_pool_addrs, unsigned, void*)

/* Event groups */

static const unsigned int evf_established_event_groups_addrs[] = { 0x103D0284, 0x103D09B4, 0x0, 0x103CE2D4 };
#define EVF_Established_Event_Groups SYSCALL_CUSTOM(evf_established_event_groups_addrs, unsigned, void)

static const unsigned int evf_event_group_information_addrs[] = { 0x103D029C, 0x103D09CC, 0x0, 0x103CE2EC };
#define EVF_Event_Group_Information SYSCALL_CUSTOM(evf_event_group_information_addrs, unsigned, void*, char*, unsigned*, unsigned*, void**)

static const unsigned int evf_event_group_pointers_addrs[] = { 0x103D036C, 0x103D0A9C, 0x0, 0x103CE3BC };
#define EVF_Event_Group_Pointers SYSCALL_CUSTOM(evf_event_group_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int evc_delete_event_group_addrs[] = { 0x10273E84, 0x102745B0, 0x0, 0x10274084 };
#define EVC_Delete_Event_Group SYSCALL_CUSTOM(evc_delete_event_group_addrs, unsigned, void*)

/* Queues */

static const unsigned int quf_established_queues_addrs[] = { 0x1027685C, 0x10276F88, 0x0, 0x10276A5C };
#define QUF_Established_Queues SYSCALL_CUSTOM(quf_established_queues_addrs, unsigned, void)

static const unsigned int quf_queue_information_addrs[] = { 0x10276874, 0x10276FA0, 0x0, 0x10276A74 };
#define QUF_Queue_Information SYSCALL_CUSTOM(quf_queue_information_addrs, unsigned, void*, char*, void**, unsigned*, unsigned*, unsigned*, unsigned char*, unsigned*, unsigned char*, unsigned*, void**)

static const unsigned int quf_queue_pointers_addrs[] = { 0x102769AC, 0x102770D8, 0x0, 0x10276BAC };
#define QUF_Queue_Pointers SYSCALL_CUSTOM(quf_queue_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int quc_delete_queue_addrs[] = { 0x1027671C, 0x10276E48, 0x0, 0x1027691C };
#define QUC_Delete_Queue SYSCALL_CUSTOM(quc_delete_queue_addrs, unsigned, void*)

static const unsigned int quc_receive_from_queue_addrs[] = { 0x10275AC0, 0x102761EC, 0x0, 0x10275CC0 };
#define QUC_Receive_From_Queue SYSCALL_CUSTOM(quc_receive_from_queue_addrs, unsigned, void*, void*, unsigned, unsigned*, unsigned)

#endif

(In fact, I spent more time trying to compile the new nspireIO to test than to port the syscalls :P. The compiler looks for the .a in /sdk/ndless/lib/ and for the .h in %home%/.ndless/include )

EDIT: += CX non-CAS
Code: [Select]
#ifndef SYSCALLS_H
#define SYSCALLS_H

/* Tasks */

static const unsigned int tcf_established_tasks_addrs[] = { 0x102F0C1C, 0x102F1348, 0x102F0688, 0x102F0E18 };
#define TCF_Established_Tasks SYSCALL_CUSTOM(tcf_established_tasks_addrs, unsigned, void)

static const unsigned int tcc_current_task_pointer_addrs[] = { 0x102EFBF4, 0x102F0320, 0x102EF660, 0x102EFDF0 };
#define TCC_Current_Task_Pointer SYSCALL_CUSTOM(tcc_current_task_pointer_addrs, void*, void)

static const unsigned int tcf_task_information_addrs[] = { 0x102F0D10, 0x102F143C, 0x102F077C, 0x102F0F0C };
#define TCF_Task_Information SYSCALL_CUSTOM(tcf_task_information_addrs, int, void*, char*, unsigned char*, unsigned*, unsigned char*, unsigned char*, unsigned*, void**, unsigned*, unsigned*)

static const unsigned int tcf_task_pointers_addrs[] = { 0x102F0E80, 0x102F15AC, 0x102F08EC, 0x102F107C };
#define TCF_Task_Pointers SYSCALL_CUSTOM(tcf_task_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int tcc_terminate_task_addrs[] = { 0x102F06C0, 0x102F0DEC, 0x102F012C, 0x102F08BC };
#define TCC_Terminate_Task SYSCALL_CUSTOM(tcc_terminate_task_addrs, unsigned, void*)

/* Dynamic memory */

static const unsigned int dmf_established_memory_pools_addrs[] = { 0x10273948, 0x10274074, 0x102733B8, 0x10273B48 };
#define DMF_Established_Memory_Pools SYSCALL_CUSTOM(dmf_established_memory_pools_addrs, unsigned, void)

static const unsigned int dmf_memory_pool_information_addrs[] = { 0x10273960, 0x1027408C, 0x102733D0, 0x10273B60 };
#define DMF_Memory_Pool_Information SYSCALL_CUSTOM(dmf_memory_pool_information_addrs, unsigned, void*, char*, void**, unsigned*, unsigned*, unsigned*, unsigned char*, unsigned*, void*)

static const unsigned int dmf_memory_pool_pointers_addrs[] = { 0x10273A6C, 0x10274198, 0x102734DC, 0x10273C6C };
#define DMF_Memory_Pool_Pointers SYSCALL_CUSTOM(dmf_memory_pool_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int dmc_delete_memory_pool_addrs[] = { 0x10277C28, 0x10278354, 0x10277698, 0x10277E28 };
#define DMC_Delete_Memory_Pool SYSCALL_CUSTOM(dmc_delete_memory_pool_addrs, unsigned, void*)

/* Event groups */

static const unsigned int evf_established_event_groups_addrs[] = { 0x103D0284, 0x103D09B4, 0x103CDB44, 0x103CE2D4 };
#define EVF_Established_Event_Groups SYSCALL_CUSTOM(evf_established_event_groups_addrs, unsigned, void)

static const unsigned int evf_event_group_information_addrs[] = { 0x103D029C, 0x103D09CC, 0x103CDB5C, 0x103CE2EC };
#define EVF_Event_Group_Information SYSCALL_CUSTOM(evf_event_group_information_addrs, unsigned, void*, char*, unsigned*, unsigned*, void**)

static const unsigned int evf_event_group_pointers_addrs[] = { 0x103D036C, 0x103D0A9C, 0x103CDC2C, 0x103CE3BC };
#define EVF_Event_Group_Pointers SYSCALL_CUSTOM(evf_event_group_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int evc_delete_event_group_addrs[] = { 0x10273E84, 0x102745B0, 0x102738F4, 0x10274084 };
#define EVC_Delete_Event_Group SYSCALL_CUSTOM(evc_delete_event_group_addrs, unsigned, void*)

/* Queues */

static const unsigned int quf_established_queues_addrs[] = { 0x1027685C, 0x10276F88, 0x102762CC, 0x10276A5C };
#define QUF_Established_Queues SYSCALL_CUSTOM(quf_established_queues_addrs, unsigned, void)

static const unsigned int quf_queue_information_addrs[] = { 0x10276874, 0x10276FA0, 0x102762E4, 0x10276A74 };
#define QUF_Queue_Information SYSCALL_CUSTOM(quf_queue_information_addrs, unsigned, void*, char*, void**, unsigned*, unsigned*, unsigned*, unsigned char*, unsigned*, unsigned char*, unsigned*, void**)

static const unsigned int quf_queue_pointers_addrs[] = { 0x102769AC, 0x102770D8, 0x1027641C, 0x10276BAC };
#define QUF_Queue_Pointers SYSCALL_CUSTOM(quf_queue_pointers_addrs, unsigned, void**, unsigned)

static const unsigned int quc_delete_queue_addrs[] = { 0x1027671C, 0x10276E48, 0x1027618C, 0x1027691C };
#define QUC_Delete_Queue SYSCALL_CUSTOM(quc_delete_queue_addrs, unsigned, void*)

static const unsigned int quc_receive_from_queue_addrs[] = { 0x10275AC0, 0x102761EC, 0x10275530, 0x10275CC0 };
#define QUC_Receive_From_Queue SYSCALL_CUSTOM(quc_receive_from_queue_addrs, unsigned, void*, void*, unsigned, unsigned*, unsigned)

#endif
« Last Edit: March 20, 2013, 01:05:30 pm by excale »

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: TI-Nspire Task Manager
« Reply #21 on: March 20, 2013, 01:27:12 pm »
Nice!
Here is the tns file with full classic/CX support for the people who can't compile it themselves.

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: TI-Nspire Task Manager
« Reply #22 on: March 20, 2013, 01:59:09 pm »
Does this mean that we can set priorities higher to make it run faster?

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: TI-Nspire Task Manager
« Reply #23 on: March 20, 2013, 02:13:31 pm »
Does this mean that we can set priorities higher to make it run faster?
I don't think higher priorities will make your calc run faster.

Also, it won't let me exit sometimes D:. When leaving sometimes the selection goes up and down in the menu screen and then taskmanager restarts. Other times it just restarts as soon as you exit :P I'm using a CX.

Some people need a high five in the face... with a chair.
~EC

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: TI-Nspire Task Manager
« Reply #24 on: March 20, 2013, 03:04:25 pm »
Sorry for the double post but I felt like it didn't really fit in as an edit. I've made a list of what happens when a process is killed. It's far from complete as most processes don't seem to have a direct impact on calculator performance and others are quite funny like disabling the off button :)
Just the plain list:
https://docs.google.com/spreadsheet/pub?key=0Al5dJ7BUU6MkdDNfOHdSYVRROXlUS0prTWdjWHN1YlE&output=html

If you've found something add it here:
https://docs.google.com/spreadsheet/ccc?key=0Al5dJ7BUU6MkdDNfOHdSYVRROXlUS0prTWdjWHN1YlE&usp=sharing
« Last Edit: March 20, 2013, 03:05:33 pm by ElementCoder »

Some people need a high five in the face... with a chair.
~EC

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: TI-Nspire Task Manager
« Reply #25 on: March 20, 2013, 05:19:37 pm »
Does this mean that we can set priorities higher to make it run faster?
I don't think higher priorities will make your calc run faster.

No, I mean like when you set the priority higher on windows. It makes the program run faster. So could we do the same with Programs?

Offline excale

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 103
  • Rating: +19/-1
    • View Profile
Re: TI-Nspire Task Manager
« Reply #26 on: March 20, 2013, 05:45:24 pm »
No, I mean like when you set the priority higher on windows. It makes the program run faster. So could we do the same with Programs?

Interrupts' priorities are something very different from the "priority" of programs you're talking about.

To keep it simple, you can't make your program faster that way :).
« Last Edit: March 20, 2013, 05:45:32 pm by excale »