Hi all,
I am trying to subtract the value of a macro from a pointer but after this operation, I still get the same pointer address.
In particular, why the following code
Code:
struct list_head *init_tasks = tasks;
printk("init_task next task is: 0x%X\n", init_tasks->next);
gives the same result with this?:
Code:
init_tasks = (uint8_t*)(init_tasks->next - (uint32_t)SEGMENT_OFFSET);
printk("init_task next task (phys) is: 0x%X\n", init_tasks);
Could anyone let me know what I am doing wrong?
Thanks in advance.