liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <sys/types.h> |
| 3 | #include <sys/stat.h> |
| 4 | #include <sys/socket.h> |
| 5 | #include <netinet/in.h> |
| 6 | #include <netdb.h> |
| 7 | #include <arpa/inet.h> |
| 8 | #include <fcntl.h> |
| 9 | #include <time.h> |
| 10 | #include <unistd.h> |
| 11 | #include <errno.h> |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 12 | #include <string.h> |
| 13 | #include <stdlib.h> |
| 14 | #include <pthread.h> |
| 15 | |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 16 | #include "log_config.h" |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 17 | #include "mbtk_utils.h" |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 18 | |
| 19 | #define ALOG_DEV "/dev/log_radio" |
xf.li | 4364377 | 2024-03-04 19:39:53 -0800 | [diff] [blame] | 20 | #define LOG_CONFIG_LEN 50 |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 21 | |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 22 | #define RADIOLOG_BUFF_SIZE (4*1024) |
| 23 | #define MAX_BUFFER_SIZE (8*1024) |
| 24 | |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 25 | #define LOGGER_ENTRY_MAX_LEN (5*1024) |
| 26 | |
| 27 | |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 28 | typedef enum android_LogPriority { |
| 29 | ANDROID_LOG_UNKNOWN = 0, |
| 30 | ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */ |
| 31 | ANDROID_LOG_VERBOSE, |
| 32 | ANDROID_LOG_DEBUG, |
| 33 | ANDROID_LOG_INFO, |
| 34 | ANDROID_LOG_WARN, |
| 35 | ANDROID_LOG_ERROR, |
| 36 | ANDROID_LOG_FATAL, |
| 37 | ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */ |
| 38 | } android_LogPriority; |
| 39 | |
| 40 | typedef struct AndroidLogEntry_t { |
| 41 | time_t tv_sec; |
| 42 | long tv_nsec; |
| 43 | android_LogPriority priority; |
| 44 | int32_t pid; |
| 45 | int32_t tid; |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 46 | char * tag; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 47 | size_t messageLen; |
| 48 | const char * message; |
| 49 | } AndroidLogEntry; |
| 50 | |
xf.li | 4364377 | 2024-03-04 19:39:53 -0800 | [diff] [blame] | 51 | //static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file, *hostname; |
| 52 | static char log_file[LOG_CONFIG_LEN], log_ip[LOG_CONFIG_LEN], log_port[LOG_CONFIG_LEN], log_prefix[LOG_CONFIG_LEN], pid_file[LOG_CONFIG_LEN], hostname[LOG_CONFIG_LEN]; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 53 | static int log_size = 1 * 1024 * 1024; |
| 54 | |
| 55 | static log_config_entry *config = NULL; |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 56 | static char tmp_log[1024] = {0}; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 57 | |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 58 | static int fd_radio = 0; |
| 59 | |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 60 | int tcp_connect(char* ip, int port); |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 61 | |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 62 | extern int tmp_rd_fd; |
l.yang | fa05af3 | 2024-11-27 00:00:56 -0800 | [diff] [blame^] | 63 | //extern char radiolog_buff[MAX_BUFFER_SIZE]; |
| 64 | extern char *radio_globalPtr; |
| 65 | extern int radio_len; |
| 66 | |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 67 | |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 68 | void hex_print(char* buf, int len) |
| 69 | { |
| 70 | int i; |
| 71 | |
| 72 | for (i = 0; i < len; i++) { |
| 73 | printf("%x ", buf[i]); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | static char filterPriToChar(android_LogPriority pri) |
| 78 | { |
| 79 | switch (pri) { |
| 80 | case ANDROID_LOG_VERBOSE: |
| 81 | return 'V'; |
| 82 | case ANDROID_LOG_DEBUG: |
| 83 | return 'D'; |
| 84 | case ANDROID_LOG_INFO: |
| 85 | return 'I'; |
| 86 | case ANDROID_LOG_WARN: |
| 87 | return 'W'; |
| 88 | case ANDROID_LOG_ERROR: |
| 89 | return 'E'; |
| 90 | case ANDROID_LOG_FATAL: |
| 91 | return 'F'; |
| 92 | case ANDROID_LOG_SILENT: |
| 93 | return 'S'; |
| 94 | |
| 95 | case ANDROID_LOG_DEFAULT: |
| 96 | case ANDROID_LOG_UNKNOWN: |
| 97 | default: |
| 98 | return '?'; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | static android_LogPriority filterCharToPri(char c) |
| 103 | { |
| 104 | switch (c) { |
| 105 | case 'v': |
| 106 | return ANDROID_LOG_VERBOSE; |
| 107 | case 'd': |
| 108 | return ANDROID_LOG_DEBUG; |
| 109 | case 'i': |
| 110 | return ANDROID_LOG_INFO; |
| 111 | case 'w': |
| 112 | return ANDROID_LOG_WARN; |
| 113 | case 'e': |
| 114 | return ANDROID_LOG_ERROR; |
| 115 | case 'f': |
| 116 | return ANDROID_LOG_FATAL; |
| 117 | case 's': |
| 118 | return ANDROID_LOG_SILENT; |
| 119 | case '*': |
| 120 | default: |
| 121 | return ANDROID_LOG_VERBOSE; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | int fileter_log(int pri, char *tag, struct filter_list_t *filter) |
| 126 | { |
| 127 | struct filter_list_t *_filter = filter; |
| 128 | |
| 129 | while(_filter) |
| 130 | { |
| 131 | int p = filterCharToPri(_filter->priority); |
| 132 | if(_filter->tag) |
| 133 | { |
| 134 | int len = strlen(_filter->tag); |
| 135 | // tag and priority |
| 136 | if(0 == memcmp(_filter->tag, tag, len) && ((pri > p) || (pri == p))) |
| 137 | return 0; |
| 138 | }else{ // have no tag |
| 139 | if(pri < p) |
| 140 | return -1; |
| 141 | else |
| 142 | return 0; |
| 143 | } |
| 144 | _filter = _filter->next; |
| 145 | } |
| 146 | |
| 147 | return -1; |
| 148 | } |
| 149 | |
| 150 | int alog_process(char* data, int len, AndroidLogEntry *entry) |
| 151 | { |
| 152 | int i, n = 0; |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 153 | // int tmp_len; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 154 | |
| 155 | for (i = 0; i < len;) { |
| 156 | if (data[i] == '\0') { |
| 157 | i += 1; |
| 158 | } else { |
| 159 | switch (n) { |
| 160 | case 0: { |
| 161 | // printf("%d - %d: %x\n", i, tmp_len, data[i]); |
| 162 | i++; |
| 163 | break; |
| 164 | } |
| 165 | case 1: { |
| 166 | int* pid = (int*)&data[i]; |
| 167 | entry->pid = *pid; |
| 168 | // printf("%d pid: %d\n", i, entry->pid); |
| 169 | i += 4; |
| 170 | break; |
| 171 | } |
| 172 | case 2: { |
| 173 | int* tid = (int*)&data[i]; |
| 174 | entry->tid = *tid; |
| 175 | // printf("%d tid: %d\n", i, entry->tid); |
| 176 | i += 4; |
| 177 | break; |
| 178 | } |
| 179 | case 3: { |
| 180 | // printf("%d - %d: %x %x %x %x\n", i, tmp_len, data[i], data[i + 1], data[i + 2], data[i + 3]); |
| 181 | time_t* _t = (time_t*)&data[i]; |
| 182 | entry->tv_sec = *_t; |
| 183 | i += 8; |
| 184 | break; |
| 185 | } |
| 186 | case 4: { |
| 187 | entry->priority = data[i]; |
| 188 | entry->tag = &data[i + 1]; |
| 189 | i += strlen(&data[i]); |
| 190 | break; |
| 191 | } |
| 192 | //* format: <priority:1><tag:N>\0<message:N>\0 |
| 193 | case 5: { |
| 194 | entry->message = &data[i]; |
| 195 | entry->messageLen = strlen(&data[i]); |
| 196 | i += entry->messageLen; |
| 197 | break; |
| 198 | } |
| 199 | default: |
| 200 | printf("process error \n"); |
l.yang | f08c4a0 | 2024-11-24 21:18:22 -0800 | [diff] [blame] | 201 | return -1; |
| 202 | //break; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 203 | } |
| 204 | n++; |
| 205 | } |
| 206 | } |
| 207 | return 0; |
| 208 | } |
| 209 | |
| 210 | int android_log_printLogLine( |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 211 | struct file_list_t *_file_list, |
| 212 | const AndroidLogEntry *entry) |
| 213 | { |
| 214 | char priChar; |
| 215 | char timeBuf[32]; |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 216 | char defaultBuffer[LOGGER_ENTRY_MAX_LEN] = {0}; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 217 | size_t totalLen; |
xf.li | 01e3982 | 2024-10-30 16:00:32 +0800 | [diff] [blame] | 218 | int index = 0; |
| 219 | int len = 0; |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 220 | struct stat s; |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 221 | |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 222 | |
| 223 | static char buffer[MAX_BUFFER_SIZE] = {0}; |
| 224 | static int buffer_index = 0; |
l.yang | fa05af3 | 2024-11-27 00:00:56 -0800 | [diff] [blame^] | 225 | radio_globalPtr = buffer; |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 226 | |
| 227 | if(fcntl(fd_radio, F_GETFL) == -1 || access(tmp_log, W_OK) != 0) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 228 | { |
| 229 | fd_radio = open(tmp_log, O_CREAT | O_WRONLY| O_APPEND, 0600); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 230 | if (fd_radio < 0) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 231 | { |
| 232 | fprintf(stderr, "failed to open %s: %s\n", tmp_log, strerror(errno)); |
| 233 | exit(-1); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 234 | } |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 235 | tmp_rd_fd = fd_radio; |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 236 | } |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 237 | |
| 238 | |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 239 | if (log_size && (!stat(tmp_log, &s)) && (s.st_size > log_size)) |
| 240 | { |
| 241 | fd_radio = get_rotate_file(fd_radio, log_file, _file_list); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 242 | if (fd_radio < 0) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 243 | { |
| 244 | fprintf(stderr, "failed to open %s: %s\n", log_file, strerror(errno)); |
| 245 | exit(-1); |
| 246 | } |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 247 | tmp_rd_fd = fd_radio; |
| 248 | |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 249 | } |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 250 | |
| 251 | if(fileter_log(entry->priority, entry->tag, config->filter_list)) |
| 252 | { |
| 253 | // printf("%s %d: fileter pri:%d tag:%s!\n", __FUNCTION__, __LINE__, entry->priority, entry->tag); |
| 254 | return -1; |
| 255 | } |
| 256 | |
| 257 | priChar = filterPriToChar(entry->priority); |
| 258 | struct tm* ptm = localtime(&entry->tv_sec); |
| 259 | strftime(timeBuf, sizeof(timeBuf), "%Y-%m-%d %H:%M:%S", ptm); |
| 260 | |
| 261 | totalLen = snprintf(defaultBuffer, sizeof(defaultBuffer), |
| 262 | "%s %c/%s (%d): %s\n", timeBuf, priChar, entry->tag, entry->pid, entry->message); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 263 | |
xf.li | 01e3982 | 2024-10-30 16:00:32 +0800 | [diff] [blame] | 264 | len = strlen(defaultBuffer); |
| 265 | if(access("/etc/syslog_encrypt_flag", F_OK) == 0) |
| 266 | { |
| 267 | for(index = 0; index < len; index++) |
| 268 | { |
| 269 | defaultBuffer[index] ^= 1; |
| 270 | } |
| 271 | } |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 272 | |
| 273 | if(buffer_index + totalLen >= RADIOLOG_BUFF_SIZE && buffer_index < RADIOLOG_BUFF_SIZE) |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 274 | { |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 275 | memcpy(buffer + buffer_index, defaultBuffer, totalLen); |
| 276 | buffer_index += totalLen; |
| 277 | if (write(fd_radio, buffer, buffer_index) < 0) |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 278 | { |
| 279 | perror("write error"); |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 280 | close(fd_radio); |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 281 | return -1; |
| 282 | } |
| 283 | buffer_index = 0; // Reset buffer index after flushing |
| 284 | } |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 285 | else |
| 286 | { |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 287 | memcpy(buffer + buffer_index, defaultBuffer, totalLen); |
| 288 | buffer_index += totalLen; |
l.yang | fa05af3 | 2024-11-27 00:00:56 -0800 | [diff] [blame^] | 289 | //memcpy(radiolog_buff,buffer,buffer_index); |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 290 | } |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 291 | |
| 292 | |
l.yang | 67782e6 | 2024-11-05 01:28:10 -0800 | [diff] [blame] | 293 | return 0; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 294 | } |
| 295 | |
| 296 | void* alog_thread(void* argv) |
| 297 | { |
| 298 | int dev_fd, ret; |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 299 | // int log_fd; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 300 | AndroidLogEntry entry; |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 301 | char buf[LOGGER_ENTRY_MAX_LEN] = {0}; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 302 | static struct file_list_t file_list; |
| 303 | config = (log_config_entry *)argv; |
| 304 | |
| 305 | pthread_detach(pthread_self()); |
| 306 | if (NULL == argv) |
| 307 | return NULL; |
| 308 | |
| 309 | dev_fd = open(ALOG_DEV, O_RDONLY, 0600); |
| 310 | if (dev_fd < 0) { |
| 311 | fprintf(stderr, "failed to open %s: %s\n", ALOG_DEV, strerror(errno)); |
| 312 | exit(-1); |
| 313 | } |
| 314 | |
| 315 | memset(&file_list, 0, sizeof(struct file_list_t)); |
| 316 | file_list.total = config->rotate_file_count; |
xf.li | 4364377 | 2024-03-04 19:39:53 -0800 | [diff] [blame] | 317 | //log_file = config->out_path; |
| 318 | memset(log_file, 0, sizeof(log_file)); |
| 319 | memset(log_ip, 0, sizeof(log_ip)); |
| 320 | memset(log_port, 0, sizeof(log_port)); |
| 321 | memset(log_prefix, 0, sizeof(log_prefix)); |
| 322 | memset(pid_file, 0, sizeof(pid_file)); |
| 323 | memset(hostname, 0, sizeof(hostname)); |
| 324 | if(config->out_path != NULL) |
| 325 | { |
| 326 | strncpy(log_file, config->out_path, LOG_CONFIG_LEN - 1); |
| 327 | } |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 328 | |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 329 | if (config->ip && config->port) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 330 | { |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 331 | int port = atoi(config->port); |
| 332 | printf("%s %d : %s:%s\n", __FUNCTION__, __LINE__, config->ip, config->port); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 333 | tcp_connect(config->ip, port); |
| 334 | } |
| 335 | else if (strlen(log_file) > 0) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 336 | { |
| 337 | //sprintf(tmp_log, "/tmp/log%s", strstr_tail(log_file, "/")); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 338 | |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 339 | snprintf(tmp_log,sizeof(tmp_log), "%s", log_file); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 340 | // 先将文件保存到 /tmp/log/ 目录下,后面到达 rotate_file_size 后,转移到out_path |
l.yang | 250444d | 2024-11-12 00:35:10 -0800 | [diff] [blame] | 341 | |
| 342 | fd_radio = open(tmp_log, O_CREAT | O_WRONLY| O_APPEND, 0600); |
| 343 | if (fd_radio < 0) |
| 344 | { |
| 345 | fprintf(stderr, "failed to open %s: %s\n", tmp_log, strerror(errno)); |
| 346 | exit(-1); |
| 347 | } |
| 348 | tmp_rd_fd = fd_radio; |
| 349 | } |
| 350 | else |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 351 | { |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 352 | //log_fd = STDOUT_FILENO; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 353 | } |
| 354 | if(config->rotate_file_size) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 355 | { |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 356 | log_size = config->rotate_file_size; |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 357 | } |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 358 | printf("android log start...\n"); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 359 | while (1) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 360 | { |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 361 | ret = read(dev_fd, buf, sizeof(buf)); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 362 | if (ret < 0) |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 363 | { |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 364 | printf("read error\n"); |
| 365 | break; |
| 366 | } |
| 367 | alog_process(buf, ret, &entry); |
l.yang | b7972c7 | 2024-10-15 22:34:51 -0700 | [diff] [blame] | 368 | android_log_printLogLine(&file_list, &entry); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 369 | memset(buf, 0, sizeof(buf)); |
| 370 | } |
| 371 | close(dev_fd); |
b.liu | 9e8584b | 2024-11-06 19:21:28 +0800 | [diff] [blame] | 372 | |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 373 | printf("%s exit \n", __FUNCTION__); |
| 374 | pthread_exit(NULL); |
| 375 | return NULL; |
| 376 | } |