Functions like workgroup_memory_barrier_with_group_sync() are unsafe, but it is not clear why (no "Safety" section in docs).
They should either not be unsafe or "Safety" section should be added to corresponding function docs explaining how to use them safely.