/* If the output buffer is full, return immediately in case O_NONBLOCK
* has been specified or loop until space becomes available.
*/
- if ((ret=canque_get_inslot4id(qends, &qedge, &slot,
+ if ((ret=canque_get_inslot4id(qends, &qedge, &slot,
0, msg_buff->id, 0))<0){
DEBUGMSG("Buffer is full\n");
if(ret < -1)
if (fptr->f_flags & O_NONBLOCK)
return -EAGAIN;
- ret=canque_get_inslot4id_wait_rtl(qends, &qedge, &slot,
+ ret=canque_get_inslot4id_wait_rtl(qends, &qedge, &slot,
0, msg_buff->id, 0);
if (ret == -1)
return -EINTR;
-
+
if(ret<0) {
return -EIO;
}
canque_put_inslot(qends, qedge, slot);
bytes_to_copy = length-sizeof(struct canmsg_t);
- /*
+ /*
* Try to send more messages
*/
while (bytes_to_copy >= sizeof(struct canmsg_t)) {
/* has been dependent on "extended" option */
/* Get slot */
- if(canque_get_inslot4id(qends, &qedge, &slot,
+ if(canque_get_inslot4id(qends, &qedge, &slot,
0, msg_buff->id, 0) < 0) break;
slot->msg=*(msg_buff++);
slot->msg.flags=msg_flags;
canque_sync_wait_rtl(qends, qedge);
}
return length-bytes_to_copy;
-}
+}
#endif /*CAN_WITH_RTL*/