source: svn/trunk/newcon3bcm2_21bu/magnum/basemodules/kni/linuxuser/bkni_iso_c.c

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2010, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bkni_iso_c.c $
11 * $brcm_Revision: Hydra_Software_Devel/5 $
12 * $brcm_Date: 5/10/10 5:00p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: C:/myviews/alanlam_view_scd/magnum/basemodules/kni/generic/bkni_iso_c.c $
19 *
20 * Hydra_Software_Devel/5   5/10/10 5:00p alanlam
21 * SW35230-223: The return value of BKNI_Memchr in bkni_iso_c.c needs to
22 * be explicitly casted to (void*) in order to by compilable from MS
23 * VS2005.
24 *
25 * Hydra_Software_Devel/4   3/11/03 9:54p vsilyaev
26 * support for  new bkni.h .
27 *
28 * Hydra_Software_Devel/3   3/10/03 8:28p vsilyaev
29 * Added support for the tagged kernet interface API.
30 *
31 * Hydra_Software_Devel/2   3/10/03 6:47p vsilyaev
32 * Fix compilation problem for release build.
33 *
34 * Hydra_Software_Devel/1   3/10/03 1:17p vsilyaev
35 * Implementation of the kernel interface functions for ISO C 89
36 * complatible environment.
37 *
38 ***************************************************************************/
39
40
41#include "bstd.h"
42#include "bkni.h"
43
44/* needed to support tagged interface */
45#undef BKNI_Malloc
46#undef BKNI_Free
47
48#include <string.h>
49#include <stdlib.h>
50
51void *
52BKNI_Memset(void *b, int c, size_t len)
53{
54    return memset(b, c, len);
55}
56
57void *
58BKNI_Memcpy(void *dst, const void *src, size_t len)
59{
60    return memcpy(dst, src, len);
61}
62
63int 
64BKNI_Memcmp(const void *b1, const void *b2, size_t len)
65{
66    return memcmp(b1, b2, len);
67}
68
69void *
70BKNI_Memchr(const void *b, int c, size_t len)
71{
72    return (void*)memchr(b, c, len);
73
74}
75
76void *
77BKNI_Memmove(void *dst, const void *src, size_t len)
78{
79    return memmove(dst, src, len);
80}
81
82void *
83BKNI_Malloc(size_t size)
84{
85    return malloc(size);
86}
87
88void 
89BKNI_Free(void *ptr)
90{
91    free(ptr);
92    return;
93}
94
Note: See TracBrowser for help on using the repository browser.