• R/O
  • SSH
  • HTTPS

chibios: Commit


Commit MetaInfo

Revision15628 (tree)
Time2022-05-17 22:05:50
Authorgdisirio

Log Message

Few bugs fixed.

Change Summary

Incremental Difference

--- trunk/os/sb/host/sbvrq.c (revision 15627)
+++ trunk/os/sb/host/sbvrq.c (revision 15628)
@@ -216,9 +216,11 @@
216216
217217 void sb_api_vrq_setwt(struct port_extctx *ectxp) {
218218 sb_class_t *sbp = (sb_class_t *)chThdGetSelfX()->ctx.syscall.p;
219+ uint32_t m;
219220
221+ m = ectxp->r0;
220222 ectxp->r0 = sbp->vrq_wtmask;
221- sbp->vrq_wtmask |= ectxp->r0;
223+ sbp->vrq_wtmask |= m;
222224
223225 vrq_check_trigger(sbp, ectxp);
224226 }
@@ -225,16 +227,20 @@
225227
226228 void sb_api_vrq_clrwt(struct port_extctx *ectxp) {
227229 sb_class_t *sbp = (sb_class_t *)chThdGetSelfX()->ctx.syscall.p;
230+ uint32_t m;
228231
232+ m = ectxp->r0;
229233 ectxp->r0 = sbp->vrq_wtmask;
230- sbp->vrq_wtmask &= ~ectxp->r0;
234+ sbp->vrq_wtmask &= ~m;
231235 }
232236
233237 void sb_api_vrq_seten(struct port_extctx *ectxp) {
234238 sb_class_t *sbp = (sb_class_t *)chThdGetSelfX()->ctx.syscall.p;
239+ uint32_t m;
235240
241+ m = ectxp->r0;
236242 ectxp->r0 = sbp->vrq_enmask;
237- sbp->vrq_enmask |= ectxp->r0;
243+ sbp->vrq_enmask |= m;
238244
239245 vrq_check_trigger(sbp, ectxp);
240246 }
@@ -241,9 +247,11 @@
241247
242248 void sb_api_vrq_clren(struct port_extctx *ectxp) {
243249 sb_class_t *sbp = (sb_class_t *)chThdGetSelfX()->ctx.syscall.p;
250+ uint32_t m;
244251
252+ m = ectxp->r0;
245253 ectxp->r0 = sbp->vrq_enmask;
246- sbp->vrq_enmask &= ~ectxp->r0;
254+ sbp->vrq_enmask &= ~m;
247255 }
248256
249257 void sb_api_vrq_disable(struct port_extctx *ectxp) {
--- trunk/os/sb/user/sbuser.h (revision 15627)
+++ trunk/os/sb/user/sbuser.h (revision 15628)
@@ -191,6 +191,13 @@
191191 "r" (r2), "r" (r3) : "memory")
192192 /** @} */
193193
194+/**
195+ * @brief VRQ return pseudo-instruction.
196+ *
197+ * @api
198+ */
199+#define __sb_vrq_return() __syscall0(255)
200+
194201 /*===========================================================================*/
195202 /* External declarations. */
196203 /*===========================================================================*/
@@ -839,41 +846,53 @@
839846 /**
840847 * @brief VRQ @p setwt pseudo-instruction.
841848 *
849+ * @param[in] m VRQs mask
850+ *
842851 * @api
843852 */
844-static inline void __sb_vrq_setwt(void) {
853+static inline uint32_t __sb_vrq_setwt(uint32_t m) {
845854
846- __syscall0(248);
855+ __syscall1r(248, m);
856+ return r0;
847857 }
848858
849859 /**
850860 * @brief VRQ @p clrwt pseudo-instruction.
851861 *
862+ * @param[in] m VRQs mask
863+ *
852864 * @api
853865 */
854-static inline void __sb_vrq_clrwt(void) {
866+static inline uint32_t __sb_vrq_clrwt(uint32_t m) {
855867
856- __syscall0(249);
868+ __syscall1r(249, m);
869+ return r0;
857870 }
858871
859872 /**
860873 * @brief VRQ @p seten pseudo-instruction.
861874 *
875+ * @param[in] m VRQs mask
876+ *
862877 * @api
863878 */
864-static inline void __sb_vrq_seten(void) {
879+static inline uint32_t __sb_vrq_seten(uint32_t m) {
865880
866- __syscall0(250);
881+ __syscall1r(250, m);
882+ return r0;
867883 }
868884
869885 /**
870886 * @brief VRQ @p clren pseudo-instruction.
871887 *
888+ * @param[in] m VRQs mask
889+ *
872890 * @api
873891 */
874-static inline void __sb_vrq_clren(void) {
892+static inline uint32_t __sb_vrq_clren(uint32_t m) {
875893
876- __syscall0(251);
894+ __syscall1r(251, m);
895+ return r0;
877896 }
878897
879898 /**
@@ -907,16 +926,6 @@
907926 return r0;
908927 }
909928
910-/**
911- * @brief VRQ return pseudo-instruction.
912- *
913- * @api
914- */
915-static inline void __sb_vrq_return(void) {
916-
917- __syscall0(255);
918-}
919-
920929 #endif /* SBUSER_H */
921930
922931 /** @} */
Show on old repository browser