https://github.com/torvalds/linux
Raw File
Tip revision: 1860e379875dfe7271c649058aeddffe5afd9d0d authored by Linus Torvalds on 08 June 2014, 18:19:54 UTC
Linux 3.15
Tip revision: 1860e37
checksum_64.h
/*
 * 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
back to top