mirror of https://github.com/Qortal/Brooklyn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
361 B
19 lines
361 B
/* |
|
* Licensed under the GPL |
|
*/ |
|
|
|
#ifndef __UM_SYSDEP_CHECKSUM_H |
|
#define __UM_SYSDEP_CHECKSUM_H |
|
|
|
static inline unsigned add32_with_carry(unsigned a, unsigned b) |
|
{ |
|
asm("addl %2,%0\n\t" |
|
"adcl $0,%0" |
|
: "=r" (a) |
|
: "0" (a), "r" (b)); |
|
return a; |
|
} |
|
|
|
extern __sum16 ip_compute_csum(const void *buff, int len); |
|
|
|
#endif
|
|
|