http://freej.dyne.org/codedoc/fastmemcpy_8h_source.html

来源:互联网 发布:php 秒杀系统设计思路 编辑:程序博客网 时间:2024/06/06 10:42
00001 /*00002    (c) Copyright 2000-2002  convergence integrated media GmbH.00003    (c) Copyright 2002       convergence GmbH.00004    00005    All rights reserved.00006 00007    Written by Denis Oliver Kropp <dok@directfb.org>,00008               Andreas Hundt <andi@fischlustig.de> and00009               Sven Neumann <sven@convergence.de>.00010 00011    This library is free software; you can redistribute it and/or00012    modify it under the terms of the GNU Lesser General Public00013    License as published by the Free Software Foundation; either00014    version 2 of the License, or (at your option) any later version.00015 00016    This library is distributed in the hope that it will be useful,00017    but WITHOUT ANY WARRANTY; without even the implied warranty of00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU00019    Lesser General Public License for more details.00020 00021    You should have received a copy of the GNU Lesser General Public00022    License along with this library; if not, write to the00023    Free Software Foundation, Inc., 59 Temple Place - Suite 330,00024    Boston, MA 02111-1307, USA.00025 */00026 00027 #ifndef __MISC__MEMCPY_H__00028 #define __MISC__MEMCPY_H__00029 00030 #include <stdlib.h>00031 #include <string.h>00032 00033 #include <config.h>00034 00035 void find_best_memcpy();00036 00037 extern void *(*jmemcpy)( void *to, const void *from, size_t len );00038 00039 static inline void *jmemmove( void *to, const void *from, size_t len )00040 {00041   if (from > to  ||  ((const char*) from + len) < ((char*) to))00042     return jmemcpy( to, from, len );00043   00044   return memmove( to, from, len );00045 }00046 00047 #endif00048 

原创粉丝点击