Changeset d34657e in mainline
- Timestamp:
- 2005-05-11T17:00:13Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 27dc170
- Parents:
- 724b58a
- Location:
- src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lib/func.c
r724b58a rd34657e 33 33 #include <arch.h> 34 34 35 __u32 haltstate = 0; 35 __u32 haltstate = 0; /**< Halt flag */ 36 36 37 38 /** Halt wrapper 39 * 40 * Set halt flag and halt the cpu. 41 * 42 */ 37 43 void halt(void) 38 44 { … … 44 50 45 51 46 /* 47 * returns 0 if src == dst 48 * otherwise returns 1 52 /** Compare two NULL terminated strings 53 * 54 * Do a char-by-char comparment of two NULL terminated strings. 55 * The strings are considered equal iff they have the same 56 * length and consist of the same characters. 57 * 58 * @param src First string to compare. 59 * @param dst Second string to compare. 60 * 61 * @return 0 if the strings are equal, 1 otherwise. 62 * 49 63 */ 50 64 int strcmp(char *src, char *dst) -
src/lib/list.c
r724b58a rd34657e 29 29 #include <list.h> 30 30 31 32 /** Check for membership 33 * 34 * Check whether link is contained in the list head. 35 * The membership is defined as pointer equivalence. 36 * 37 * @param link Item to look for. 38 * @param head List to look in. 39 * 40 * @return 1 if link is contained in head, 0 otherwise. 41 * 42 */ 31 43 int list_member(link_t *link, link_t *head) 32 44 { … … 45 57 } 46 58 59 60 /** Concatenate two lists 61 * 62 * Concatenate lists head1 and head2, producing a single 63 * list head1 containing items from both (in head1, head2 64 * order) and empty list head2. 65 * 66 * @param head1 First list and concatenated output 67 * @param head2 Second list and empty output. 68 * 69 */ 47 70 void list_concat(link_t *head1, link_t *head2) 48 71 { -
src/lib/memstr.c
r724b58a rd34657e 30 30 #include <arch/types.h> 31 31 32 33 /** Copy block of memory 34 * 35 * Copy cnt bytes from src address to dst address. 36 * The copying is done byte-by-byte. The source 37 * and destination memory areas cannot overlap. 38 * 39 * @param src Origin address to copy from. 40 * @param dst Origin address to copy to. 41 * @param cnt Number of bytes to copy. 42 * 43 */ 32 44 void _memcopy(__address src, __address dst, int cnt) 33 45 { … … 38 50 } 39 51 52 53 /** Fill block of memory 54 * 55 * Fill cnt bytes at dst address with the value x. 56 * The filling is done byte-by-byte. 57 * 58 * @param dst Origin address to fill. 59 * @param cnt Number of bytes to fill. 60 * @param x Value to fill. 61 * 62 */ 40 63 void _memsetb(__address dst, int cnt, __u8 x) 41 64 {
Note:
See TracChangeset
for help on using the changeset viewer.