Changeset 6a5d05b in mainline
- Timestamp:
- 2018-01-12T23:48:48Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 132ab5d1, 50f19b7
- Parents:
- 9ba415e
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-12 23:44:26)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-12 23:48:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
r9ba415e r6a5d05b 1856 1856 void async_usleep(suseconds_t timeout) 1857 1857 { 1858 amsg_t *msg = amsg_create(); 1859 if (!msg) 1860 return; 1861 1862 msg->wdata.fid = fibril_get_id(); 1863 1864 getuptime(&msg->wdata.to_event.expires); 1865 tv_add_diff(&msg->wdata.to_event.expires, timeout); 1858 awaiter_t awaiter; 1859 awaiter_initialize(&awaiter); 1860 1861 awaiter.fid = fibril_get_id(); 1862 1863 getuptime(&awaiter.to_event.expires); 1864 tv_add_diff(&awaiter.to_event.expires, timeout); 1866 1865 1867 1866 futex_down(&async_futex); 1868 1867 1869 async_insert_timeout(& msg->wdata);1868 async_insert_timeout(&awaiter); 1870 1869 1871 1870 /* Leave the async_futex locked when entering this function */ … … 1873 1872 1874 1873 /* Futex is up automatically after fibril_switch() */ 1875 1876 amsg_destroy(msg);1877 1874 } 1878 1875
Note:
See TracChangeset
for help on using the changeset viewer.