File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tests/benchmarks/multicore/common/remote_gdf_switching/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,18 @@ void set_global_domain_frequency(uint32_t freq)
4444int main (void )
4545{
4646 uint32_t counter = 0 ;
47+ int32_t sync_timeout = 100 ;
4748
4849 gpio_pin_configure_dt (& led , GPIO_OUTPUT_INACTIVE );
4950
5051 printk ("REMOTE starts" );
51- while (* shared_var != HOST_IS_READY ) {
52+ while (* shared_var != HOST_IS_READY && sync_timeout > 0 ) {
5253 k_msleep (1 );
5354 sys_cache_data_invd_range ((void * ) shared_var , sizeof (* shared_var ));
5455 printk ("shared_var is: %u" , * shared_var );
56+ sync_timeout -- ;
5557 }
56- printk ("REMOTE found that HOST_IS_READY" );
58+ printk ("REMOTE found that HOST_IS_READY or sync_timeout: %d too low" , sync_timeout );
5759 * shared_var = REMOTE_IS_READY ;
5860 sys_cache_data_flush_range ((void * ) shared_var , sizeof (* shared_var ));
5961 printk ("REMOTE wrote REMOTE_IS_READY: %u" , * shared_var );
You can’t perform that action at this time.
0 commit comments