RTEMS | Draft: cpukit: add support for common CAN/CAN FD stack (!49)
Pavel Pisa (@ppisa)
gitlab at rtems.org
Fri Jun 28 11:27:26 UTC 2024
Pavel Pisa commented on a discussion on cpukit/dev/can/can-bus.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108453
> + );
> + memcpy(
> + &bittiming->bittiming_const,
> + chip->data_bittiming_const,
> + sizeof( struct can_bittiming_const )
> + );
> + } else {
> + ret = -EINVAL;
> + }
> +
> + break;
> +
> + case RTEMS_CAN_CHIP_GET_TIMESTAMP:
> + uint64_t timestamp;
> + if ( chip->chip_ops.get_chip_timestamp != NULL ) {
> + ret = chip->chip_ops.get_chip_timestamp( chip, ×tamp );
This is attempt to not pass pointer to the user data internally in the code to allow easier adaptation back to MMU based kernels where copy_to_user and copy_from_user or similar mechanism would be required. So only filesystem level functions (read, write, IOCTLs) access user provided pointers directly.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108453
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240628/622ac84b/attachment.htm>
More information about the bugs
mailing list