Chameleon

Chameleon Svn Source Tree

Root/tags/2.0/i386/modules/klibc/memswap.c

Source at commit 1822 created 12 years 5 months ago.
By ifabio, - Added Ati 6570 and 6450 (subdevID and Frambuffer) : http://forge.voodooprojects.org/p/chameleon/issues/220/ - Update Chameleon.xcodeproj
1/*
2 * memswap()
3 *
4 * Swaps the contents of two nonoverlapping memory areas.
5 * This really could be done faster...
6 */
7
8#include <string.h>
9
10void memswap(void *m1, void *m2, size_t n)
11{
12char *p = m1;
13char *q = m2;
14char tmp;
15
16while (n--) {
17tmp = *p;
18*p = *q;
19*q = tmp;
20
21p++;
22q++;
23}
24}
25

Archive Download this file

Revision: 1822