Changeset 5cd136ab in mainline for uspace/lib/libc/generic


Ignore:
Timestamp:
2010-04-02T13:37:58Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9a66bc2e
Parents:
57937dd
Message:

device interfaces and driver cooperation - parts of code

Location:
uspace/lib/libc/generic
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/devman.c

    r57937dd r5cd136ab  
    2828 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2929 */
     30 
     31 /** @addtogroup libc
     32 * @{
     33 */
     34/** @file
     35 */
    3036
    3137#include <string.h>
     
    193199        }
    194200}
     201
     202int devman_device_connect(device_handle_t handle, unsigned int flags)
     203{
     204        int phone;
     205       
     206        if (flags & IPC_FLAG_BLOCKING) {
     207                phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
     208                    DEVMAN_CONNECT_TO_DEVICE, handle);
     209        } else {
     210                phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
     211                    DEVMAN_CONNECT_TO_DEVICE, handle);
     212        }
     213       
     214        return phone;
     215}
     216
     217int devman_parent_device_connect(device_handle_t handle, unsigned int flags)
     218{
     219        int phone;
     220       
     221        if (flags & IPC_FLAG_BLOCKING) {
     222                phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
     223                    DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle);
     224        } else {
     225                phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
     226                    DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle);
     227        }
     228       
     229        return phone;
     230}
     231
     232/** @}
     233 */
Note: See TracChangeset for help on using the changeset viewer.