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


Ignore:
Timestamp:
2010-07-02T14:19:30Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
89c57b6
Parents:
fe7abd0 (diff), e3ee9b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

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

    rfe7abd0 rcefb126  
    2727 */
    2828
    29 /** @addtogroup libcabs32le
     29/** @addtogroup genericverify
    3030 * @{
    3131 */
     
    3333 */
    3434
    35 #ifndef LIBC_abs32le__LIMITS_H_
    36 #define LIBC_abs32le__LIMITS_H_
     35#ifndef KERN_VERIFY_H_
     36#define KERN_VERIFY_H_
    3737
    38 #define LONG_MIN MIN_INT32
    39 #define LONG_MAX MAX_INT32
    40 #define ULONG_MIN MIN_UINT32
    41 #define ULONG_MAX MAX_UINT32
    4238
    43 #define SIZE_MIN MIN_UINT32
    44 #define SIZE_MAX MAX_UINT32
    45 #define SSIZE_MIN MIN_INT32
    46 #define SSIZE_MAX MAX_INT32
     39#ifdef CONFIG_VERIFY_VCC
     40
     41#define ATOMIC         __specification_attr("atomic_inline", "")
     42
     43#define READS(ptr)     __specification(reads(ptr))
     44#define WRITES(ptr)    __specification(writes(ptr))
     45#define REQUIRES(...)  __specification(requires __VA_ARGS__)
     46
     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))
     55
     56#else /* CONFIG_VERIFY_VCC */
     57
     58#define ATOMIC
     59
     60#define READS(ptr)
     61#define WRITES(ptr)
     62#define REQUIRES(...)
     63
     64#define EXTENT(ptr)
     65#define ARRAY_RANGE(ptr, nmemb)
     66
     67#define REQUIRES_EXTENT_MUTABLE(ptr)
     68#define REQUIRES_ARRAY_MUTABLE(ptr, nmemb)
     69
     70#endif /* CONFIG_VERIFY_VCC */
     71
    4772
    4873#endif
Note: See TracChangeset for help on using the changeset viewer.