摘要: 370 #ifndef __HAVE_ARCH_STRLEN371 /**372 * strlen - Find the length of a string373 * @s: The string to be sized374 */375 size_t strlen(const char *s)376 {377 const char *sc;378379 for (sc = s; *sc != '\0'; ++sc)380 /* nothing */;381 return sc - s;382 }383 EXPORT_SYMBOL(strlen);38... 阅读全文
posted @ 2012-03-20 14:47 移动应用开发 阅读(460) 评论(0) 推荐(0)
摘要: 240 #ifndef __HAVE_ARCH_STRCMP241 /**242 * strcmp - Compare two strings243 * @cs: One string244 * @ct: Another string245 */246 #undef strcmp247 int strcmp(const char *cs, const char *ct)248 {249 unsigned char c1, c2;250251 while (1) {252 c1 = *cs++;253 c2 = *ct++;254 ... 阅读全文
posted @ 2012-03-20 14:44 移动应用开发 阅读(4113) 评论(0) 推荐(0)
摘要: 164 #ifndef __HAVE_ARCH_STRCAT165 /**166 * strcat - Append one %NUL-terminated string to another167 * @dest: The string to be appended to168 * @src: The string to append to it169 */170 #undef strcat171 char *strcat(char *dest, const char *src)172 {173 char *tmp = dest;174175 while (*dest)176... 阅读全文
posted @ 2012-03-20 14:30 移动应用开发 阅读(302) 评论(0) 推荐(0)
摘要: 91 #ifndef __HAVE_ARCH_STRCPY92 /**93 * strcpy - Copy a %NUL terminated string94 * @dest: Where to copy the string to95 * @src: Where to copy the string from96 */97 #undef strcpy98 char *strcpy(char *dest, const char *src)99 {100 char *tmp = dest;101102 while ((*dest++ = *src++) != '\0')103 阅读全文
posted @ 2012-03-20 14:04 移动应用开发 阅读(515) 评论(0) 推荐(0)
摘要: 531 #ifndef __HAVE_ARCH_MEMSET532 /**533 * memset - Fill a region of memory with the given value534 * @s: Pointer to the start of the area.535 * @c: The byte to fill the area with536 * @count: The size of the area.537 *538 * Do not use memset() to access IO space, use memset_io() instead.539 */540 v 阅读全文
posted @ 2012-03-20 13:51 移动应用开发 阅读(228) 评论(0) 推荐(0)
摘要: 573 #ifndef __HAVE_ARCH_MEMMOVE574 /**575 * memmove - Copy one area of memory to another576 * @dest: Where to copy to577 * @src: Where to copy from578 * @count: The size of the area.579 *580 * Unlike memcpy(), memmove() copes with overlapping areas.581 */582 void *memmove(void *dest, const void *src 阅读全文
posted @ 2012-03-20 13:46 移动应用开发 阅读(336) 评论(0) 推荐(0)
摘要: 551 #ifndef __HAVE_ARCH_MEMCPY552 /**553 * memcpy - Copy one area of memory to another554 * @dest: Where to copy to555 * @src: Where to copy from556 * @count: The size of the area.557 *558 * You should not use this function to access IO space, use memcpy_toio()559 * or memcpy_fromio() instead.560 */ 阅读全文
posted @ 2012-03-20 13:38 移动应用开发 阅读(521) 评论(0) 推荐(0)
摘要: 如果你需要你的service与远程进程通信,那么你可以使用一个Messenger来为你的service提供接口.此技术使用不必使用AIDL就能执行进程间通信(IPC). 下面是如何使用Messenger的概要:service实现一个接收从客户端的每个调用引起的回调的Handler.Handler被用来创建一个Messenger对象(它是Handler的一个引用).Messenger创建一个从service的onBind()返回给客户端的IBinder.客户端使用IBinder来实例化这个Messenger(它引用到service的Handler),客户端用它来向service发送Messag. 阅读全文
posted @ 2012-03-20 08:06 移动应用开发 阅读(146) 评论(0) 推荐(0)