jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <string.h> |
| 4 | #include <sys/types.h> |
| 5 | #include <sys/stat.h> |
| 6 | #include <fcntl.h> |
| 7 | #include <errno.h> |
| 8 | #include <pthread.h> |
jb.qi | e7aac6d | 2023-12-28 01:32:19 -0800 | [diff] [blame] | 9 | #include <unistd.h> |
jb.qi | 1f6204d | 2024-01-30 22:14:24 -0800 | [diff] [blame] | 10 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 11 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 12 | #include <lynq_autosuspend.h> |
| 13 | #include "lynq-qser-autosuspend.h" |
| 14 | #include "liblog/lynq_deflog.h" |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 15 | #include <include/lynq_uci.h> |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 16 | |
| 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | |
| 22 | extern int lynq_autosleep_enable(void); |
| 23 | extern int lynq_autosleep_disable(void); |
| 24 | extern int release_wake_lock(char *name); |
| 25 | extern int acquire_wake_lock(int lock, char *name); |
| 26 | |
| 27 | #define USER_LOG_TAG "LYNQ_QSER_AUTOSUSPEND" |
| 28 | #define FILE_LOCK_TABLE "/tmp/.lock_table" |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 29 | #define LOG_UCI_MODULE "lynq_autosuspend" |
| 30 | #define LOG_UCI_FILE "lynq_uci" |
| 31 | |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 32 | #define UEVENT_MSG_LEN 128 |
| 33 | |
jb.qi | 1b4d54e | 2024-01-03 22:22:42 -0800 | [diff] [blame] | 34 | int g_init_flag = 0; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 35 | |
| 36 | |
| 37 | qser_lpm_Handler_t g_lpm_handler = NULL; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 38 | |
| 39 | |
| 40 | LOCK_TABLE lock_status; |
| 41 | |
| 42 | |
| 43 | int file_fd; |
| 44 | int first_run = 0; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 45 | pthread_t thid; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 46 | |
| 47 | |
| 48 | int lock_table_init(void) |
| 49 | { |
| 50 | int ret; |
| 51 | int err; |
| 52 | |
| 53 | file_fd = open(FILE_LOCK_TABLE, O_RDWR| O_CREAT,0777); |
| 54 | if(file_fd < 0) |
| 55 | { |
| 56 | err = errno; |
| 57 | LYINFLOG("Error open lock_table file:%s\n", strerror(errno)); |
| 58 | return -err; |
| 59 | } |
| 60 | memset(&lock_status, 0, sizeof(lock_status)); |
| 61 | ret = write(file_fd, (char*)&lock_status, sizeof(lock_status)); |
| 62 | if(ret <= 0) |
| 63 | { |
| 64 | LYINFLOG("write fail\n"); |
| 65 | close(file_fd); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 66 | return E_WRITE; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 67 | } |
| 68 | sync(); |
| 69 | close(file_fd); |
| 70 | return 0; |
| 71 | } |
| 72 | |
| 73 | |
| 74 | int read_lock_table(void) |
| 75 | { |
| 76 | int err; |
| 77 | int ret; |
| 78 | int i; |
| 79 | LYLOGSET(LOG_INFO); |
| 80 | LYLOGEINIT(USER_LOG_TAG); |
| 81 | |
| 82 | if(access(FILE_LOCK_TABLE,0) < 0) |
| 83 | { |
| 84 | ret = lock_table_init(); |
| 85 | if(ret < 0) |
| 86 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 87 | return E_READ; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 88 | } |
| 89 | } |
| 90 | |
| 91 | file_fd = open(FILE_LOCK_TABLE,O_RDWR); |
| 92 | if(file_fd < 0) |
| 93 | { |
| 94 | err = errno; |
| 95 | LYINFLOG("Error open lock_table file:%s\n", strerror(errno)); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 96 | return E_READ; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | memset(&lock_status, 0, sizeof(lock_status)); |
| 100 | lseek(file_fd,0,SEEK_SET); |
| 101 | ret = read(file_fd,(unsigned char *)&lock_status,sizeof(lock_status)); |
| 102 | LYINFLOG("read ret=%d\n", ret); |
| 103 | if(ret <= 0) |
| 104 | { |
| 105 | close(file_fd); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 106 | return E_READ; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | for(i=0;i<MAX_LOCK_NUM;i++) |
| 110 | { |
| 111 | if(strlen(lock_status.lock_name[i]) != 0) |
| 112 | { |
| 113 | LYINFLOG("fd: %d lock_name:%s strlen:%d\n", i, lock_status.lock_name[i], strlen(lock_status.lock_name[i])); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | close(file_fd); |
| 118 | return 0; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | int save_lock_table(void) |
| 123 | { |
| 124 | int err; |
| 125 | int ret; |
| 126 | file_fd = open(FILE_LOCK_TABLE,O_RDWR); |
| 127 | if(file_fd < 0) |
| 128 | { |
| 129 | err = errno; |
| 130 | LYINFLOG("Error open lock_table file:%s\n", strerror(errno)); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 131 | return E_WRITE; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 132 | } |
| 133 | LYINFLOG("write lock_name[0]: %s\n", lock_status.lock_name[0]); |
| 134 | ret = write(file_fd, (unsigned char *)&lock_status, sizeof(lock_status)); |
| 135 | LYINFLOG("write ret=%d\n", ret); |
| 136 | if(ret <= 0) |
| 137 | { |
| 138 | LYINFLOG("write fail\n"); |
| 139 | close(file_fd); |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 140 | return E_WRITE; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 141 | } |
| 142 | sync(); |
| 143 | close(file_fd); |
| 144 | |
| 145 | return 0; |
| 146 | } |
| 147 | |
| 148 | |
| 149 | int check_lock(char *name) |
| 150 | { |
| 151 | int j; |
| 152 | int num; |
| 153 | for(j=0;j<MAX_LOCK_NUM;j++) |
| 154 | { |
| 155 | if(strcmp(lock_status.lock_name[j], name) == 0) |
| 156 | { |
| 157 | num = j; |
| 158 | break; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | if(j < MAX_LOCK_NUM) |
| 163 | { |
| 164 | return num; |
| 165 | } |
| 166 | |
| 167 | return -1; |
| 168 | } |
| 169 | |
| 170 | |
| 171 | int add_lock(char *name) |
| 172 | { |
| 173 | int ret; |
| 174 | int i = 0; |
| 175 | int num; |
| 176 | int check_flag; |
| 177 | |
| 178 | LYINFLOG("name:%s\n", name); |
| 179 | ret = read_lock_table(); |
| 180 | LYINFLOG("read_lock_table ret = %d\n", ret); |
| 181 | if(ret <0) |
| 182 | { |
| 183 | return ret; |
| 184 | } |
| 185 | |
| 186 | check_flag = check_lock(name); |
| 187 | |
| 188 | if(check_flag < 0) |
| 189 | { |
| 190 | for(i=0;i<MAX_LOCK_NUM;i++) |
| 191 | { |
| 192 | if(strlen(lock_status.lock_name[i]) == 0) |
| 193 | { |
| 194 | strcpy(lock_status.lock_name[i], name); |
| 195 | LYINFLOG("lock_name[%d] %s\n", i, lock_status.lock_name[i]); |
| 196 | break; |
| 197 | } |
| 198 | } |
| 199 | if(i == MAX_LOCK_NUM) |
| 200 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 201 | return E_TABLE_FULL; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 202 | } |
| 203 | else |
| 204 | { |
| 205 | num = i; |
| 206 | } |
| 207 | } |
| 208 | else |
| 209 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 210 | return E_LOCK_EXIST; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | LYINFLOG("num = %d\n", num); |
| 214 | ret = save_lock_table(); |
| 215 | if(ret < 0) |
| 216 | { |
| 217 | return ret; |
| 218 | } |
| 219 | return num; |
| 220 | } |
| 221 | |
| 222 | int delete_lock(int fd) |
| 223 | { |
| 224 | int ret; |
| 225 | int i; |
| 226 | ret = read_lock_table(); |
| 227 | memset(lock_status.lock_name[fd], 0, sizeof(lock_status.lock_name[fd])); |
| 228 | ret = save_lock_table(); |
| 229 | return ret; |
| 230 | } |
| 231 | |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 232 | |
| 233 | void *check_dtr(void * arg) |
| 234 | { |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 235 | qser_lpm_edge_t lpm_edge; |
jb.qi | 1f6204d | 2024-01-30 22:14:24 -0800 | [diff] [blame] | 236 | char msg[16]; |
| 237 | int fd=0; |
| 238 | int ret=0; |
| 239 | |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 240 | while(1) |
| 241 | { |
jb.qi | 1f6204d | 2024-01-30 22:14:24 -0800 | [diff] [blame] | 242 | fd = open("/sys/xp2xp/xp2xp_notify/xp2xp_state", O_RDONLY); |
| 243 | ret=read(fd, &msg,15); |
| 244 | LYERRLOG("xp2xp_state ret = %d\n", ret); |
| 245 | close(fd); |
| 246 | |
| 247 | if(ret == 5) |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 248 | { |
jb.qi | 1f6204d | 2024-01-30 22:14:24 -0800 | [diff] [blame] | 249 | lpm_edge =E_QL_LPM_FALLING; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 250 | } |
jb.qi | 1f6204d | 2024-01-30 22:14:24 -0800 | [diff] [blame] | 251 | else if(ret == 6) |
| 252 | { |
| 253 | lpm_edge =E_QL_LPM_RISING; |
| 254 | } |
| 255 | else |
| 256 | { |
| 257 | continue; |
| 258 | } |
| 259 | g_lpm_handler(lpm_edge); |
| 260 | |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 261 | } |
| 262 | |
| 263 | return 0; |
| 264 | } |
| 265 | |
| 266 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 267 | int qser_lpm_init(qser_lpm_Handler_t qser_lpm_handler, qser_pm_cfg_t *qser_lpm_cfg) |
| 268 | { |
| 269 | int ret; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 270 | int num; |
jb.qi | 1b4d54e | 2024-01-03 22:22:42 -0800 | [diff] [blame] | 271 | if(g_init_flag != 0) |
| 272 | { |
| 273 | LYERRLOG("g_init_flag is error\n"); |
| 274 | return -1; |
| 275 | } |
| 276 | g_init_flag = 1; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 277 | g_lpm_handler = qser_lpm_handler; |
| 278 | ret = pthread_create(&thid,NULL,check_dtr,NULL); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 279 | if(ret != 0) |
| 280 | { |
jb.qi | 1b4d54e | 2024-01-03 22:22:42 -0800 | [diff] [blame] | 281 | LYERRLOG("pthread create fail, qser_lpm_init fail\n"); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 282 | } |
| 283 | return ret; |
| 284 | } |
| 285 | |
| 286 | |
| 287 | int qser_lpm_deinit(void) |
| 288 | { |
| 289 | int ret; |
jb.qi | 1b4d54e | 2024-01-03 22:22:42 -0800 | [diff] [blame] | 290 | if(g_init_flag != 1) |
| 291 | { |
| 292 | LYERRLOG("g_init_flag is error"); |
| 293 | return -1; |
| 294 | } |
| 295 | g_init_flag = 0; |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 296 | ret = pthread_cancel(thid); |
| 297 | if(!ret) |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 298 | { |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 299 | LYERRLOG("pthread cancel success, lpm deinit success\n"); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 300 | } |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 301 | else |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 302 | { |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 303 | LYERRLOG("pthread cancel fail, lpm deinit fail\n"); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 304 | } |
jb.qi | fbef514 | 2023-12-18 00:49:10 -0800 | [diff] [blame] | 305 | return ret; |
| 306 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 307 | } |
| 308 | |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 309 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 310 | int qser_autosuspend_enable(char enable) |
| 311 | { |
| 312 | int ret; |
| 313 | if(enable == '0') |
| 314 | { |
| 315 | ret = lynq_autosleep_disable(); |
| 316 | |
| 317 | } |
| 318 | else if(enable == '1') |
| 319 | { |
| 320 | ret = lynq_autosleep_enable(); |
| 321 | } |
| 322 | else |
| 323 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 324 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 325 | |
| 326 | } |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 327 | if(ret >= 0) |
| 328 | { |
| 329 | ret = 0; |
| 330 | } |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 331 | return ret; |
| 332 | |
| 333 | } |
| 334 | |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 335 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 336 | int qser_wakelock_create(const char *name, size_t len) |
| 337 | { |
| 338 | int ret; |
| 339 | if(name == NULL) |
| 340 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 341 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 342 | } |
| 343 | LYINFLOG("%s\n", name); |
| 344 | ret = add_lock(name); |
| 345 | return ret; |
| 346 | } |
| 347 | |
| 348 | int qser_wakelock_lock(int fd) |
| 349 | { |
| 350 | |
| 351 | int ret; |
| 352 | if(fd < 0 || fd >= MAX_LOCK_NUM) |
| 353 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 354 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 355 | } |
| 356 | ret = read_lock_table(); |
| 357 | ret = acquire_wake_lock( 0, lock_status.lock_name[fd]); |
jb.qi | 68fe778 | 2023-09-18 20:40:58 -0700 | [diff] [blame] | 358 | if(ret > 0) |
| 359 | { |
| 360 | ret = 0; |
| 361 | } |
| 362 | else |
| 363 | { |
| 364 | ret = -1; |
| 365 | } |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 366 | return ret; |
| 367 | } |
| 368 | |
| 369 | int qser_wakelock_unlock(int fd) |
| 370 | { |
| 371 | int ret; |
| 372 | if(fd < 0 || fd >= MAX_LOCK_NUM) |
| 373 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 374 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 375 | } |
| 376 | ret = read_lock_table(); |
| 377 | if(strlen(lock_status.lock_name[fd]) == 0) |
| 378 | { |
| 379 | LYINFLOG("%d is null\n", fd); |
| 380 | return -1; |
| 381 | } |
| 382 | ret = release_wake_lock(lock_status.lock_name[fd]); |
jb.qi | 68fe778 | 2023-09-18 20:40:58 -0700 | [diff] [blame] | 383 | if(ret > 0) |
| 384 | { |
| 385 | ret = 0; |
| 386 | } |
| 387 | else |
| 388 | { |
| 389 | ret = -1; |
| 390 | } |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 391 | return ret; |
| 392 | } |
| 393 | |
| 394 | int qser_wakelock_destroy(int fd) |
| 395 | { |
| 396 | int ret; |
| 397 | if(fd < 0 || fd >= MAX_LOCK_NUM) |
| 398 | { |
jb.qi | aa241cf | 2023-09-18 18:35:00 -0700 | [diff] [blame] | 399 | return E_INPUT_ERROR; |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 400 | } |
jb.qi | 5221035 | 2023-09-19 23:29:09 -0700 | [diff] [blame] | 401 | ret = qser_wakelock_unlock(fd); |
| 402 | if(ret) |
| 403 | { |
| 404 | LYINFLOG("unlock is fail\n"); |
| 405 | return ret; |
| 406 | } |
| 407 | |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 408 | ret = delete_lock(fd); |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 409 | return ret; |
| 410 | } |
| 411 | |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 412 | int qser_whitelist_set(char *whitelist) |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 413 | { |
| 414 | int ret; |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 415 | char cmd[64]; |
| 416 | if(strlen(whitelist) != 4) |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 417 | { |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 418 | LYINFLOG("string len is error\n"); |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 419 | return -1; |
| 420 | } |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 421 | sprintf(cmd, "uci set lynq_uci.lynq_autosuspend.whitelist_state='%s'", whitelist); |
| 422 | ret = system(cmd); |
| 423 | system("uci commit"); |
| 424 | if(ret != 0) |
| 425 | { |
| 426 | LYINFLOG("qser_whitlist_set fail"); |
| 427 | } |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 428 | return ret; |
| 429 | |
| 430 | } |
| 431 | |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 432 | int qser_whitelist_get(char *whitelist) |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 433 | { |
| 434 | int ret; |
jb.qi | 7a90186 | 2024-01-03 19:45:23 -0800 | [diff] [blame] | 435 | ret = lynq_get_value(LOG_UCI_FILE, LOG_UCI_MODULE, "whitelist_state", whitelist); |
| 436 | LYERRLOG("ret =%d, whitelist_state is %s\n", ret, whitelist); |
jb.qi | 422ee11 | 2023-11-21 03:04:03 -0800 | [diff] [blame] | 437 | return ret; |
| 438 | |
| 439 | } |
| 440 | |
you.chen | 21c62b7 | 2023-09-08 09:41:11 +0800 | [diff] [blame] | 441 | DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_AUTOSUSPEND) |
| 442 | |
jb.qi | 3a8298c | 2023-09-07 04:48:51 -0700 | [diff] [blame] | 443 | #ifdef __cplusplus |
| 444 | } |
| 445 | #endif |
| 446 | |
| 447 | |
| 448 | |