RTI Connext Micro
Version 2.4.1.0
Main Page
RTI Connext Micro Documentation
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
osapi_string_impl.h
Go to the documentation of this file.
1
/*
2
* FILE: osapi_string_impl.h - Implementation of string interface
3
*
4
* Copyright 2012-2014 Real-Time Innovations, Inc.
5
*
6
* No duplications, whole or partial, manual or electronic, may be made
7
* without express written permission. Any such copies, or
8
* revisions thereof, must display this notice unaltered.
9
* This code contains trade secrets of Real-Time Innovations, Inc.
10
*
11
* Modification History
12
* --------------------
13
* 12mar2012,tk Written
14
*/
15
/*ce
16
* \file
17
* \brief String interface implementation
18
*/
19
#ifndef osapi_string_impl_h
20
#define osapi_string_impl_h
21
22
#if 0
23
#ifdef RTI_VXWORKS
24
#ifdef RTI_RTP
25
#include <strings.h>
26
#include <string.h>
27
#else
28
#include <string.h>
29
#endif
30
31
#define OSAPI_Memory_copy(to, src, size) \
32
(bcopy((const char *)src, (char *)to, size),1)
33
34
/* NOTE: we use bfill here as this avoids a function call. On VxWorks,
35
bzero(m,s) is a function implemented as bfill(m,s,0) */
36
#define OSAPI_Memory_zero(m, size) (bfill((char *)m, size, 0),m)
37
#define OSAPI_Memory_compare(l, r, size) bcmp((char *)l, (char *)r, size)
38
#define OSAPI_Memory_move(l,r,size) (bcopy((const char *)r, (char *)l, size),l)
39
#define OSAPI_Memory_fndchr(m,c,size) memchr((const void *)m, c, size)
40
41
#define OSAPI_String_length(__name) strlen(__name)
42
#define OSAPI_String_cmp(left_,right_) strcmp(left_,right_)
43
#define OSAPI_String_ncmp(left_,right_,num_) strncmp(left_,right_,num_)
44
45
#elif defined(SDCC)
46
void
*memcpy(
void
*s1,
const
void
*s2,
size_t
n);
47
#else
48
49
#define OSAPI_Memory_copy memcpy
50
#define OSAPI_Memory_zero(m, size) memset(m, 0, size)
51
#define OSAPI_Memory_compare memcmp
52
#define OSAPI_Memory_move memmove
53
#define OSAPI_Memory_fndchr(m,c,size) memchr((const void *)m, c, size)
54
55
#define OSAPI_String_length(__name) strlen(__name)
56
#define OSAPI_String_cmp(left_,right_) strcmp(left_,right_)
57
#define OSAPI_String_ncmp(left_,right_,num_) strncmp(left_,right_,num_)
58
59
#endif
/* RTI_VXWORKS */
60
#endif
61
#endif
/* osapi_string_impl_h */
RTI Connext Micro Version 2.4.1.0
Copyright © Thu Nov 20 2014
Real-Time Innovations, Inc