@@ -220,6 +220,9 @@ pub struct CBP {
220
220
_marker : PhantomData < * const ( ) > ,
221
221
}
222
222
223
+ #[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
224
+ unsafe impl Send for CBP { }
225
+
223
226
#[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
224
227
impl CBP {
225
228
pub ( crate ) unsafe fn new ( ) -> Self {
@@ -234,9 +237,6 @@ impl CBP {
234
237
}
235
238
}
236
239
237
- #[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
238
- unsafe impl Send for CBP { }
239
-
240
240
#[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
241
241
impl ops:: Deref for CBP {
242
242
type Target = self :: cbp:: RegisterBlock ;
@@ -251,6 +251,8 @@ pub struct CPUID {
251
251
_marker : PhantomData < * const ( ) > ,
252
252
}
253
253
254
+ unsafe impl Send for CPUID { }
255
+
254
256
impl CPUID {
255
257
/// Returns a pointer to the register block
256
258
pub fn ptr ( ) -> * const self :: cpuid:: RegisterBlock {
@@ -271,6 +273,8 @@ pub struct DCB {
271
273
_marker : PhantomData < * const ( ) > ,
272
274
}
273
275
276
+ unsafe impl Send for DCB { }
277
+
274
278
impl DCB {
275
279
/// Returns a pointer to the register block
276
280
pub fn ptr ( ) -> * const dcb:: RegisterBlock {
@@ -291,6 +295,8 @@ pub struct DWT {
291
295
_marker : PhantomData < * const ( ) > ,
292
296
}
293
297
298
+ unsafe impl Send for DWT { }
299
+
294
300
impl DWT {
295
301
/// Returns a pointer to the register block
296
302
pub fn ptr ( ) -> * const dwt:: RegisterBlock {
@@ -314,6 +320,9 @@ pub struct FPB {
314
320
_marker : PhantomData < * const ( ) > ,
315
321
}
316
322
323
+ #[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
324
+ unsafe impl Send for FPB { }
325
+
317
326
#[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
318
327
impl FPB {
319
328
/// Returns a pointer to the register block
@@ -339,6 +348,9 @@ pub struct FPU {
339
348
_marker : PhantomData < * const ( ) > ,
340
349
}
341
350
351
+ #[ cfg( any( has_fpu, target_arch = "x86_64" ) ) ]
352
+ unsafe impl Send for FPU { }
353
+
342
354
#[ cfg( any( has_fpu, target_arch = "x86_64" ) ) ]
343
355
impl FPU {
344
356
/// Returns a pointer to the register block
@@ -364,6 +376,9 @@ pub struct ITM {
364
376
_marker : PhantomData < * const ( ) > ,
365
377
}
366
378
379
+ #[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
380
+ unsafe impl Send for ITM { }
381
+
367
382
#[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
368
383
impl ITM {
369
384
/// Returns a pointer to the register block
@@ -393,6 +408,8 @@ pub struct MPU {
393
408
_marker : PhantomData < * const ( ) > ,
394
409
}
395
410
411
+ unsafe impl Send for MPU { }
412
+
396
413
impl MPU {
397
414
/// Returns a pointer to the register block
398
415
pub fn ptr ( ) -> * const mpu:: RegisterBlock {
@@ -413,6 +430,8 @@ pub struct NVIC {
413
430
_marker : PhantomData < * const ( ) > ,
414
431
}
415
432
433
+ unsafe impl Send for NVIC { }
434
+
416
435
impl NVIC {
417
436
/// Returns a pointer to the register block
418
437
pub fn ptr ( ) -> * const nvic:: RegisterBlock {
@@ -433,6 +452,8 @@ pub struct SCB {
433
452
_marker : PhantomData < * const ( ) > ,
434
453
}
435
454
455
+ unsafe impl Send for SCB { }
456
+
436
457
impl SCB {
437
458
/// Returns a pointer to the register block
438
459
pub fn ptr ( ) -> * const scb:: RegisterBlock {
@@ -453,6 +474,8 @@ pub struct SYST {
453
474
_marker : PhantomData < * const ( ) > ,
454
475
}
455
476
477
+ unsafe impl Send for SYST { }
478
+
456
479
impl SYST {
457
480
/// Returns a pointer to the register block
458
481
pub fn ptr ( ) -> * const syst:: RegisterBlock {
@@ -476,6 +499,9 @@ pub struct TPIU {
476
499
_marker : PhantomData < * const ( ) > ,
477
500
}
478
501
502
+ #[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
503
+ unsafe impl Send for TPIU { }
504
+
479
505
#[ cfg( any( armv7m, target_arch = "x86_64" ) ) ]
480
506
impl TPIU {
481
507
/// Returns a pointer to the register block
0 commit comments