• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification,
5  * are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this list of
8  *    conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11  *    of conditions and the following disclaimer in the documentation and/or other materials
12  *    provided with the distribution.
13  *
14  * 3. Neither the name of the copyright holder nor the names of its contributors may be used
15  *    to endorse or promote products derived from this software without specific prior written
16  *    permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef __USR_LIBC_DEFINE_H
32 #define __USR_LIBC_DEFINE_H
33 
34 #define _LIBC_TEXT_ENTRY   __attribute__ ((section(".usr_libc_entry")))
35 #define _LIBC_TEXT_SECTION __attribute__ ((section(".usr_libc_text")))
36 #define _LIBC_DATA_SECTION __attribute__ ((section(".usr_libc_data")))
37 
38 #define pthread_attr_init            b_pthread_attr_init
39 #define pthread_attr_destroy         b_pthread_attr_destroy
40 #define pthread_attr_setdetachstate  b_pthread_attr_setdetachstate
41 #define pthread_attr_getdetachstate  b_pthread_attr_getdetachstate
42 #define pthread_attr_setscope        b_pthread_attr_setscope
43 #define pthread_attr_getscope        b_pthread_attr_getscope
44 #define pthread_attr_setinheritsched b_pthread_attr_setinheritsched
45 #define pthread_attr_getinheritsched b_pthread_attr_getinheritsched
46 #define pthread_attr_setschedpolicy  b_pthread_attr_setschedpolicy
47 #define pthread_attr_getschedpolicy  b_pthread_attr_getschedpolicy
48 #define pthread_attr_setschedparam   b_pthread_attr_setschedparam
49 #define pthread_attr_getschedparam   b_pthread_attr_getschedparam
50 #define pthread_attr_setstack        b_pthread_attr_setstack
51 #define pthread_attr_getstack        b_pthread_attr_getstack
52 #define pthread_attr_setstacksize    b_pthread_attr_setstacksize
53 #define pthread_attr_getstacksize    b_pthread_attr_getstacksize
54 #define sched_get_priority_min       b_sched_get_priority_min
55 #define sched_get_priority_max       b_sched_get_priority_max
56 #define pthread_create               b_pthread_create
57 #define pthread_setschedparam        b_pthread_setschedparam
58 #define pthread_getschedparam        b_pthread_getschedparam
59 #define pthread_self                 b_pthread_self
60 #define pthread_cancel               b_pthread_cancel
61 #define pthread_join                 b_pthread_join
62 #define pthread_detach               b_pthread_detach
63 #define pthread_exit                 b_pthread_exit
64 #define pthread_setname_np           b_pthread_setname_np
65 #define pthread_getname_np           b_pthread_getname_np
66 
67 #define memcpy b_memcpy
68 #define memcmp b_memcmp
69 #define memset b_memset
70 #define strlen b_strlen
71 #define strcmp b_strcmp
72 
73 #endif
74