Hi all,
I wonder how can I debug
DEBUGASSERT(pholder != NULL) in function nxsem_allocholder in file
semaphore/sem_holder.c that happens after some time reading a lot of
messages from can bus in can_reciever task?
Task looks like this (CAN dev is opened as shared file with
file_open(&CANmodule->file, "/dev/can0", O_RDWR)):
pollfd fds[1];
fds[0].fd = -1;
fds[0].ptr = CANmodule->file ;
fds[0].events = POLLIN | POLLFILE;
while (!_thread_should_exit) {
int ret = poll(fds, sizeof(fds) / sizeof(fds[0]), 1000);
if (fds[0].revents & POLLIN) {
/* Read the RX message */
CANreceive();
}
}
void CANreceive(CANmodule_t *CANmodule){
struct can_msg_s msg = {};
ssize_t nbytes;
nbytes = file_read(&CANmodule->file, &msg, sizeof(struct can_msg_s) );
...
}
Thanks in advance for any help.
--
With regards,
Oleg.