Reference database type 'int' is not a structure or union

I have the following code:

void setup()
{
address_t sp, pc;

sp = (address_t)stack1 + STACK_SIZE - sizeof(address_t);
pc = (address_t)f;


sigsetjmp(jbuf[0],1);
(jbuf[0]->__jmpbuf)[JB_SP] = translate_address(sp);<----ERROR
(jbuf[0]->__jmpbuf)[JB_PC] = translate_address(pc);<----ERROR
sigemptyset(&jbuf[0]->__saved_mask);<----ERROR     


sp = (address_t)stack2 + STACK_SIZE - sizeof(address_t);
pc = (address_t)g;

sigsetjmp(jbuf[1],1);
(jbuf[1]->__jmpbuf)[JB_SP] = translate_address(sp);<----ERROR
(jbuf[1]->__jmpbuf)[JB_PC] = translate_address(pc);<----ERROR
sigemptyset(&jbuf[1]->__saved_mask);<----ERROR

}

Any idea what this error means?

+3
source share
1 answer

The type sigjmp_buf(which is what it sigsetjmp()takes as the first parameter) is opaque - this is not what your code expects in this case. Apparently this is simple inthere, not a pointer to a structure.

If you want to disconnect from internal elements sigjmp_buf, you will need to study how it is implemented on this particular platform (and, obviously, the code will not be portable).

+3
source

All Articles