aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler.h
AgeCommit message (Collapse)Author
2013-08-26ovs-atomic: Add native Clang implementation.Ben Pfaff
With this implementation I get warnings with Clang on GNU/Linux when the previous patch is not applied. This ought to make it easier to avoid introducing new problems in the future even without building on FreeBSD. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-08-22ovs-thread: Mark lock and unlock functions as no_thread_safety_analysis.Ben Pfaff
I don't see any other way to make Clang realize that these are the real mutex implementation functions. I first noticed these warnings with Clang 1:3.4~svn188890-1~exp1. I previously used version 1:3.4~svn187484-1~exp1. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-13sparse: Remove support for thread-safety annotations.Ben Pfaff
The Clang support for thread-safety annotations is much more effective than "sparse" support. I found that I was unable to make the annotations warning-free under sparse. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-09compiler: Add OVS_ACQ_BEFORE, OVS_ACQ_AFTER macros.Ben Pfaff
An upcoming patch will add the first uses. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-07-31compiler: Fix OVS_LOCKS_EXCLUDED on non clang compilers.Ethan Jackson
This patch renames OVS_LOCKS_EXCLUDED to simply OVS_EXCLUDED so it's more consistent with the other thread safety annotations. It also adds it to the non-clang compilers. Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-07-30clang: Add annotations for thread safety check.Ethan Jackson
This commit adds annotations for thread safety check. And the check can be conducted by using -Wthread-safety flag in clang. Co-authored-by: Alex Wang <alexw@nicira.com> Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-07-17Make attribute packed equivalent for MSC compilers.Linda Sun
Signed-off-by: Linda Sun <lsun@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-06-25ovs-thread: New module, initially just with pthreads wrapper functions.Ben Pfaff
The only tricky part here is that I'm throwing in annotations to allow "sparse" to report unbalanced locking. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-16util: Introduce ovs_assert macro.Ben Pfaff
An occasionally significant problem with the standard "assert" macro is that it writes the failure message to stderr. In our daemons, stderr is generally redirected to /dev/null. It's more useful to write the failure message to the log, which is what the new ovs_assert macro introduced in this patch does. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2012-07-03Introduce ofpacts, an abstraction of OpenFlow actions.Ben Pfaff
OpenFlow actions have always been somewhat awkward to handle. Moreover, over time we've started creating actions that require more complicated parsing. When we maintain those actions internally in their wire format, we end up parsing them multiple times, whenever we have to look at the set of actions. When we add support for OpenFlow 1.1 or later protocols, the situation will get worse, because these newer protocols support many of the same actions but with different representations. It becomes unrealistic to handle each protocol in its wire format. This commit adopts a new strategy, by converting OpenFlow actions into an internal form from the wire format when they are read, and converting them back to the wire format when flows are dumped. I believe that this will be more maintainable over time. Thanks to Simon Horman and Pravin Shelar for reviews. Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02Global replace of Nicira Networks.Raju Subramanian
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-06-07compiler: Add macro for GCC "sentinel" attribute.Ben Pfaff
2011-05-16compiler: Suppress sparse complaints about function attributes.Ben Pfaff
GCC allows __attribute__s to be included in function prototypes and then omitted later on the function definition, but sparse complains about this. Furthermore, sparse doesn't like the placement of the __attribute__s that we tend to use in OVS. I don't see any value in "fixing" these to suit sparse so it seems better to just omit them.
2010-02-24Merge "master" into "next".Ben Pfaff
2010-02-12compiler: Don't use __attribute__ for non-GCC compilers.Ben Pfaff
__attribute__ is a GCC feature that we should not expose to other compilers.
2010-02-12compiler: Remove "likely" and "unlikely" macros, since we don't use them.Ben Pfaff
(The datapath uses these macros, but those come from Linux's kernel.h, not from this file.)
2010-02-12compiler: Remove PACKED macro and its only (unneeded) user.Ben Pfaff
There is no point in marking a well-aligned structure PACKED. It can only cause trouble.
2010-02-11Merge "master" into "next".Ben Pfaff
The main change here is the need to update all of the uses of UNUSED in the next branch to OVS_UNUSED as it is now spelled on "master".
2010-02-11Rename UNUSED macro to OVS_UNUSED to avoid naming conflict.Ben Pfaff
Requested by Jean Tourrilhes <jt@hpl.hp.com>.
2009-11-04Initial implementation of OVSDB.Ben Pfaff
2009-06-15Update primary code license to Apache 2.0.Ben Pfaff
2009-07-08Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff