This commit adds guide about using thread safety types and annotations
to CodingStyle file.
Signed-off-by: Alex Wang <alexw@nicira.com>
[blp@nicira.com edited the advice slightly]
Signed-off-by: Ben Pfaff <blp@nicira.com>
Clang has nice static analysis and works well as an Open vSwitch compiler,
so mention it more explicitly.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
I like the style that was prescribed here--I find it slightly easier to
read--but everyone else who submits code seems to prefer breaking
lines after binary operators instead. No point in fighting the tide.
To make the netdev code more portable, it needs to support returning error
codes from functions that don't have them. This commit changes
netdev_get_mtu() to return an error code and updates its caller.
(Currently netdev_get_mtu() won't ever return an error, but other future
implementations might.)