Staging
v0.8.1
v0.8.1
Revision f5412be599602124d2bdd49947b231dd77c0bf99 authored by Linus Torvalds on 22 February 2011, 01:25:52 UTC, committed by Linus Torvalds on 22 February 2011, 01:25:52 UTC
1 parent 3b71710
gcd.c
#include <linux/kernel.h>
#include <linux/gcd.h>
#include <linux/module.h>
/* Greatest common divisor */
unsigned long gcd(unsigned long a, unsigned long b)
{
unsigned long r;
if (a < b)
swap(a, b);
while ((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
EXPORT_SYMBOL_GPL(gcd);
Computing file changes ...