Changeset fc81981 in mainline for kernel/generic/include/verify.h


Ignore:
Timestamp:
2010-06-25T14:49:42Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
decfbe56
Parents:
33c4f72
Message:

add and improve annotations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/verify.h

    r33c4f72 rfc81981  
    4040
    4141#define ATOMIC         __specification_attr("atomic_inline", "")
    42 #define READS(...)     __specification(reads(__VA_ARGS__))
    43 #define WRITES(...)    __specification(writes(__VA_ARGS__))
     42
     43#define READS(ptr)     __specification(reads(ptr))
     44#define WRITES(ptr)    __specification(writes(ptr))
    4445#define REQUIRES(...)  __specification(requires __VA_ARGS__)
    4546
    46 #define REQUIRES_EXTENT_MUTABLE(...) \
    47         REQUIRES(\extent_mutable(__VA_ARGS__))
     47#define EXTENT(ptr)              \extent(ptr)
     48#define ARRAY_RANGE(ptr, nmemb)  \array_range(ptr, nmemb)
     49
     50#define REQUIRES_EXTENT_MUTABLE(ptr) \
     51        REQUIRES(\extent_mutable(ptr))
     52
     53#define REQUIRES_ARRAY_MUTABLE(ptr, nmemb) \
     54        REQUIRES(\mutable_array(ptr, nmemb))
    4855
    4956#else /* CONFIG_VERIFY_VCC */
    5057
    5158#define ATOMIC
    52 #define READS(...)
    53 #define WRITES(...)
     59
     60#define READS(ptr)
     61#define WRITES(ptr)
    5462#define REQUIRES(...)
    5563
    56 #define REQUIRES_EXTENT_MUTABLE(...)
     64#define EXTENT(ptr)
     65#define ARRAY_RANGE(ptr, nmemb)
     66
     67#define REQUIRES_EXTENT_MUTABLE(ptr)
     68#define REQUIRES_ARRAY_MUTABLE(ptr, nmemb)
    5769
    5870#endif /* CONFIG_VERIFY_VCC */
Note: See TracChangeset for help on using the changeset viewer.