Changes in uspace/lib/c/generic/async.c [9c31643:c7bbf029] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
r9c31643 rc7bbf029 102 102 #include <arch/barrier.h> 103 103 #include <bool.h> 104 #include <stdlib.h> 105 #include <malloc.h> 104 106 #include "private/async.h" 105 107 … … 430 432 431 433 fid_t fid = fibril_create(notification_fibril, msg); 434 if (fid == 0) { 435 free(msg); 436 futex_up(&async_futex); 437 return false; 438 } 439 432 440 fibril_add_ready(fid); 433 441 … … 681 689 conn->wdata.fid = fibril_create(connection_fibril, conn); 682 690 683 if ( !conn->wdata.fid) {691 if (conn->wdata.fid == 0) { 684 692 free(conn); 693 685 694 if (callid) 686 695 ipc_answer_0(callid, ENOMEM); 696 687 697 return (uintptr_t) NULL; 688 698 } … … 853 863 { 854 864 fid_t fid = fibril_create(async_manager_fibril, NULL); 855 fibril_add_manager(fid); 865 if (fid != 0) 866 fibril_add_manager(fid); 856 867 } 857 868 … … 1563 1574 * @param dst Address of the beginning of the destination buffer. 1564 1575 * @param size Size of the destination buffer. 1576 * @param flags Flags to control the data transfer. 1565 1577 * 1566 1578 * @return Zero on success or a negative error code from errno.h. 1567 1579 * 1568 1580 */ 1569 int async_data_read_start(int phoneid, void *dst, size_t size) 1570 { 1571 return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst, 1572 (sysarg_t) size); 1581 int 1582 async_data_read_start_generic(int phoneid, void *dst, size_t size, int flags) 1583 { 1584 return async_req_3_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst, 1585 (sysarg_t) size, (sysarg_t) flags); 1573 1586 } 1574 1587 … … 1660 1673 * @param src Address of the beginning of the source buffer. 1661 1674 * @param size Size of the source buffer. 1675 * @param flags Flags to control the data transfer. 1662 1676 * 1663 1677 * @return Zero on success or a negative error code from errno.h. 1664 1678 * 1665 1679 */ 1666 int async_data_write_start(int phoneid, const void *src, size_t size) 1667 { 1668 return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src, 1669 (sysarg_t) size); 1680 int 1681 async_data_write_start_generic(int phoneid, const void *src, size_t size, 1682 int flags) 1683 { 1684 return async_req_3_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src, 1685 (sysarg_t) size, (sysarg_t) flags); 1670 1686 } 1671 1687
Note:
See TracChangeset
for help on using the changeset viewer.