src/server/public/nsapi.h

changeset 67
50505dc3f8a6
parent 66
74babc0082b7
child 68
f5102a892ed4
equal deleted inserted replaced
66:74babc0082b7 67:50505dc3f8a6
1348 1348
1349 NSAPI_PUBLIC char *session_dns_lookup(Session *s, int verify); 1349 NSAPI_PUBLIC char *session_dns_lookup(Session *s, int verify);
1350 1350
1351 1351
1352 1352
1353 /* new macro and function definitions begin */
1354
1355 /* netbuf functions */ 1353 /* netbuf functions */
1356 NSAPI_PUBLIC netbuf *netbuf_open(SYS_NETFD sd, int sz); 1354 NSAPI_PUBLIC netbuf *netbuf_open(SYS_NETFD sd, int sz);
1357 1355
1358 NSAPI_PUBLIC void netbuf_close(netbuf *buf); 1356 NSAPI_PUBLIC void netbuf_close(netbuf *buf);
1359 1357
1377 NSAPI_PUBLIC int system_fread(SYS_FILE fd, void *buf, int nbyte); 1375 NSAPI_PUBLIC int system_fread(SYS_FILE fd, void *buf, int nbyte);
1378 NSAPI_PUBLIC int system_fwrite(SYS_FILE fd, const void *buf, int nbyte); 1376 NSAPI_PUBLIC int system_fwrite(SYS_FILE fd, const void *buf, int nbyte);
1379 NSAPI_PUBLIC off_t system_lseek(SYS_FILE fd, off_t offset, int whence); 1377 NSAPI_PUBLIC off_t system_lseek(SYS_FILE fd, off_t offset, int whence);
1380 NSAPI_PUBLIC int system_fclose(SYS_FILE fd); 1378 NSAPI_PUBLIC int system_fclose(SYS_FILE fd);
1381 1379
1380 /* new macro and function definitions begin */
1381
1382 NSAPI_PUBLIC int util_errno2status(int errno_value); // new 1382 NSAPI_PUBLIC int util_errno2status(int errno_value); // new
1383 #define util_errno2status util_errno2status 1383 #define util_errno2status util_errno2status
1384 1384
1385 1385
1386 // threadpool 1386 // threadpool
1387 threadpool_t* threadpool_new(int n); 1387 threadpool_t* threadpool_new(int min, int max);
1388 void* threadpool_func(void *data); 1388 void* threadpool_func(void *data);
1389 threadpool_job* threadpool_get_job(threadpool_t *pool); 1389 threadpool_job* threadpool_get_job(threadpool_t *pool);
1390 void threadpool_run(threadpool_t *pool, job_callback_f func, void *data); 1390 void threadpool_run(threadpool_t *pool, job_callback_f func, void *data);
1391 1391
1392 /* end new macro and function definitions */ 1392 /* end new macro and function definitions */

mercurial