diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-12-12 15:17:33 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-12-12 15:17:33 +0000 |
commit | 141b31107a64a23ef2e369cc7cc2ed91c1e78cc3 (patch) | |
tree | 78337f049e79a9886d7257668864b8aeeb7d9351 /cpukit/score/include | |
parent | Regenerate. (diff) | |
download | rtems-141b31107a64a23ef2e369cc7cc2ed91c1e78cc3.tar.bz2 |
2011-12-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/src/wkstringduplicate.c: New file.
* score/Makefile.am: Reflect change above.
* score/include/rtems/score/wkspace.h: Declare
_Workspace_String_duplicate().
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/wkspace.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/wkspace.h b/cpukit/score/include/rtems/score/wkspace.h index 89b7c6dfc5..0fc96df6c2 100644 --- a/cpukit/score/include/rtems/score/wkspace.h +++ b/cpukit/score/include/rtems/score/wkspace.h @@ -99,6 +99,23 @@ void *_Workspace_Allocate_or_fatal_error( size_t size ); +/** + * @brief Duplicates the @a string with memory from the Workspace. + * + * If the @a string length exceeds @a maxlen, then the additional characters + * will be discarded. + * + * @param[in] string Pointer to zero terminated string. + * @param[in] maxlen Maximum length of the duplicated string. + * + * @return NULL Not enough memory. + * @return other Duplicated string. + */ +char *_Workspace_String_duplicate( + const char *string, + size_t maxlen +); + #ifndef __RTEMS_APPLICATION__ #include <rtems/score/wkspace.inl> #endif |