mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
terminal: ptmx fdm handler: tag unlikely branches
This commit is contained in:
parent
79945419eb
commit
e76357eabb
1 changed files with 3 additions and 3 deletions
|
|
@ -122,15 +122,15 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
||||||
{
|
{
|
||||||
struct terminal *term = data;
|
struct terminal *term = data;
|
||||||
|
|
||||||
if (events & EPOLLOUT) {
|
if (unlikely(events & EPOLLOUT)) {
|
||||||
if (!fdm_ptmx_out(fdm, fd, events, data))
|
if (!fdm_ptmx_out(fdm, fd, events, data))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((events & EPOLLHUP) && !(events & EPOLLIN))
|
if (unlikely((events & EPOLLHUP) && !(events & EPOLLIN)))
|
||||||
return term_shutdown(term);
|
return term_shutdown(term);
|
||||||
|
|
||||||
if (!(events & EPOLLIN))
|
if (unlikely(!(events & EPOLLIN)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
uint8_t buf[24 * 1024];
|
uint8_t buf[24 * 1024];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue