Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UPDATE] fix c struct compile error #1736

Merged
merged 1 commit into from
Apr 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/bthread/unstable.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extern int bthread_about_to_quit();
// Run `on_timer(arg)' at or after real-time `abstime'. Put identifier of the
// timer into *id.
// Return 0 on success, errno otherwise.
extern int bthread_timer_add(bthread_timer_t* id, timespec abstime,
extern int bthread_timer_add(bthread_timer_t* id, struct timespec abstime,
void (*on_timer)(void*), void* arg);

// Unschedule the timer associated with `id'.
Expand All @@ -65,7 +65,7 @@ extern int bthread_fd_wait(int fd, unsigned events);
// or CLOCK_REALTIME reached `abstime' if abstime is not NULL.
// Returns 0 on success, -1 otherwise and errno is set.
extern int bthread_fd_timedwait(int fd, unsigned epoll_events,
const timespec* abstime);
const struct timespec* abstime);

// Close file descriptor `fd' and wake up all threads waiting on it.
// User should call this function instead of close(2) if bthread_fd_wait,
Expand All @@ -76,7 +76,7 @@ extern int bthread_fd_timedwait(int fd, unsigned epoll_events,
extern int bthread_close(int fd);

// Replacement of connect(2) in bthreads.
extern int bthread_connect(int sockfd, const sockaddr* serv_addr,
extern int bthread_connect(int sockfd, const struct sockaddr* serv_addr,
socklen_t addrlen);

// Add a startup function that each pthread worker will run at the beginning
Expand Down