Sorry for the late review, I don't have any good excuse.
In general, these ioctls are a bit odd without the code on the bluetoothapis side to hook them up. It's probably reasonable to add those to this merge request.
From 1/4:
```
+NTSTATUS winebluetooth_radio_set_property( winebluetooth_radio_t radio,
+ winebluetooth_radio_props_mask_t prop,
+ union winebluetooth_property *property )
```
The "property" parameter is not used.
```
+ switch (prop)
+ {
+ case WINEBLUETOOTH_RADIO_PROPERTY_CONNECTABLE:
+ case WINEBLUETOOTH_RADIO_PROPERTY_DISCOVERABLE:
+ case WINEBLUETOOTH_RADIO_PROPERTY_PAIRABLE:
+ break;
+ default:
+ return STATUS_INVALID_PARAMETER;
+ }
```
The Unix side returns STATUS_INVALID_PARAMETER for the others anyway, so you might as well just get rid of this whole switch.
```
+ case LOCAL_RADIO_CONNECTABLE:
+ status =
+ winebluetooth_radio_set_property( ext->radio, WINEBLUETOOTH_RADIO_PROPERTY_CONNECTABLE, &prop_value );
+
+ break;
+ case LOCAL_RADIO_DISCOVERABLE:
+ status =
+ winebluetooth_radio_set_property( ext->radio, WINEBLUETOOTH_RADIO_PROPERTY_DISCOVERABLE, &prop_value );
+ break;
```
Why are we translating to a different flags enum? Why not pass this flag enum directly?
You also implement the PAIRABLE property, but that code is never reached.
```
+ status = UNIX_BLUETOOTH_CALL( bluetooth_adapter_set_prop, ¶ms );
+
+ if (status != STATUS_SUCCESS) return status;
+
+ return STATUS_SUCCESS;
```
This could just be "return UNIX_BLUETOOTH_CALL( ... )".
To each their own style, I guess, but in general there are a lot of helpers that seem quite redundant...
From 2/4:
```
+ if (filter->le && filter->bredr)
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_AUTO;
+ else if (filter->le)
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_LE;
+ else if (filter->bredr)
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_BR_EDR;
+ else
+ transport = WINEBLUETOOTH_DISCOVERY_TRANSPORT_DEFAULT;
```
Why convert to an intermediate set of flags instead of just passing the params directly to the Unix side?
Aside from the fact that the bitfield might not work, but it's pretty unnecessary anyway.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7216#note_94694
64-bit volatile accesses are not atomic on i386. Both
i686-w64-mingw32-gcc and x86 MSVC splits 64-bit loads into a pair of
load/store ops.
Fix this by using a FILD/FISTP pair, which is also used to implement C11
atomics by i686-w64-mingw32-gcc.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8
--
v5: include: Prevent misuse of __WINE_ATOMIC_* helper macros for non-atomic large accesses.
server: Fix incorrect usage of __WINE_ATOMIC_STORE_RELEASE in SHARED_WRITE_BEGIN/SHARED_WRITE_END.
include: Fix ReadNoFence64 on i386.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7237
--
v5: server: Check for zero access in alloc_handle().
shell32: Don't open reg keys with zero access mask.
wbemprox: Don't open reg keys with zero access mask.
quartz: Don't open reg keys with zero access mask.
devenum: Don't open reg keys with zero access mask.
setupapi: Don't open reg keys with zero access mask.
kernel32: Don't open reg keys with zero access mask.
httpapi: Don't open files with zero access.
ntoskrnl.exe/tests: Open directory object with nonzero access in test_permanent().
https://gitlab.winehq.org/wine/wine/-/merge_requests/6047