mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add unlikely() statement to optimise the IS_ERR_VALUE() macro.
Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
e20f435517
commit
677a229c76
1 changed files with 4 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) 2010 Isilon Systems, Inc.
|
||||
* Copyright (c) 2010 iX Systems, Inc.
|
||||
* Copyright (c) 2010 Panasas, Inc.
|
||||
* Copyright (c) 2013-2015 Mellanox Technologies, Ltd.
|
||||
* Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -31,9 +31,11 @@
|
|||
#ifndef _LINUX_ERR_H_
|
||||
#define _LINUX_ERR_H_
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#define MAX_ERRNO 4095
|
||||
|
||||
#define IS_ERR_VALUE(x) ((x) >= (unsigned long)-MAX_ERRNO)
|
||||
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
|
||||
|
||||
static inline void *
|
||||
ERR_PTR(long error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue