代码拉取完成,页面将自动刷新
#ifndef UTHREAD_H
#define UTHREAD_H
#include <sys/types.h>
#include <sys/socket.h>
#include <stdint.h>
#include "timer.h"
struct uthread *ut;
int uthread_create(struct uthread **new_ut, void *func, void *arg);
ssize_t pthread_disk_read(int fd, void *buf, size_t nbytes);
ssize_t pthread_disk_write(int fd, void *buf, size_t nbytes);
int uthread_join(struct uthread *ut, void **retval);
unsigned long uthread_self(void);
void uthread_exit(void *retval);
int uthread_detach(struct uthread *ut);
// 开放给socket的接口
int uthread_socket(int domain, int type, int protocol);
int uthread_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
int uthread_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
ssize_t uthread_read(int fd, void *buf, size_t length);
ssize_t uthread_recv(int fd, void *buf, size_t length, int flags);
ssize_t uthread_recvmsg(int fd, struct msghdr *message, int flags);
ssize_t uthread_recvfrom(int fd, void *buf, size_t length, int flags, struct sockaddr *address, socklen_t *address_len);
ssize_t uthread_recv_exact(int fd, void *buf, size_t length, int flags) ;
ssize_t uthread_read_exact(int fd, void *buf, size_t length);
ssize_t uthread_write(int fd, const void *buf, size_t length);
ssize_t uthread_send(int fd, const void *buf, size_t length, int flags);
ssize_t uthread_sendmsg(int fd, const struct msghdr *message, int flags);
ssize_t uthread_sendto(int fd, const void *buf, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len);
ssize_t uthread_writev(int fd, struct iovec *iov, int iovcnt);
int enable_hook();
void main_end();
// 下面的接口临时开放给用户
void _uthread_yield();
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。