git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ethdev: remove unnecessary null check
[dpdk.git]
/
lib
/
sched
/
rte_sched_common.h
diff --git
a/lib/sched/rte_sched_common.h
b/lib/sched/rte_sched_common.h
index
96706df
..
e4cbbd9
100644
(file)
--- a/
lib/sched/rte_sched_common.h
+++ b/
lib/sched/rte_sched_common.h
@@
-51,10
+51,10
@@
rte_min_pos_4_u16(uint16_t *x)
* gcd(a, b) = gcd(b, a mod b)
*
*/
* gcd(a, b) = gcd(b, a mod b)
*
*/
-static inline uint
32
_t
-rte_get_gcd
(uint32_t a, uint32
_t b)
+static inline uint
64
_t
+rte_get_gcd
64(uint64_t a, uint64
_t b)
{
{
- uint
32
_t c;
+ uint
64
_t c;
if (a == 0)
return b;
if (a == 0)
return b;
@@
-76,6
+76,15
@@
rte_get_gcd(uint32_t a, uint32_t b)
return a;
}
return a;
}
+/*
+ * 32-bit version of Greatest Common Divisor (GCD).
+ */
+static inline uint32_t
+rte_get_gcd(uint32_t a, uint32_t b)
+{
+ return rte_get_gcd64(a, b);
+}
+
/*
* Compute the Lowest Common Denominator (LCD) of two numbers.
* This implementation computes GCD first:
/*
* Compute the Lowest Common Denominator (LCD) of two numbers.
* This implementation computes GCD first: