Changeset 1b11576d in mainline for uspace


Ignore:
Timestamp:
2010-10-23T16:04:12Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c77b4d6
Parents:
84c20da (diff), 58b833c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace
Files:
48 added
14 deleted
11 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/Makefile

    r84c20da r1b11576d  
    4646        app/tasks \
    4747        app/tester \
     48        app/test_serial \
    4849        app/tetris \
    4950        app/trace \
    5051        app/top \
     52        app/netecho \
     53        app/nettest1 \
     54        app/nettest2 \
     55        app/ping \
    5156        srv/clip \
    5257        srv/devmap \
     58        srv/devman \
    5359        srv/loader \
    5460        srv/ns \
     
    8187        srv/net/net \
    8288        srv/net/netstart \
    83         app/netecho \
    84         app/nettest1 \
    85         app/nettest2 \
    86         app/ping
     89        drv/root
    8790
    8891## Networking
     
    107110
    108111ifeq ($(UARCH),amd64)
    109         DIRS += srv/hw/bus/pci
    110112endif
    111113
    112114ifeq ($(UARCH),ia32)
    113         DIRS += srv/hw/bus/pci
     115        DIRS += drv/rootia32
     116        DIRS += drv/pciintel
     117        DIRS += drv/isa
     118        DIRS += drv/ns8250
    114119endif
    115120
     
    134139        lib/softint \
    135140        lib/softfloat \
     141        lib/drv \
    136142        lib/packet \
    137143        lib/net
    138 
    139 ifeq ($(UARCH),amd64)
    140         LIBS += lib/pci
    141 endif
    142 
    143 ifeq ($(UARCH),ia32)
    144         LIBS += lib/pci
    145 endif
    146 
    147144
    148145LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    r84c20da r1b11576d  
    8686LIBCLUI_PREFIX = $(LIB_PREFIX)/clui
    8787
    88 LIBPCI_PREFIX = $(LIB_PREFIX)/pci
    89 
     88LIBDRV_PREFIX = $(LIB_PREFIX)/drv
    9089LIBPACKET_PREFIX = $(LIB_PREFIX)/packet
    9190LIBNET_PREFIX = $(LIB_PREFIX)/net
  • uspace/app/trace/syscalls.c

    r84c20da r1b11576d  
    7373    [SYS_PHYSMEM_MAP] = { "physmem_map",                4,      V_ERRNO },
    7474    [SYS_IOSPACE_ENABLE] = { "iospace_enable",          1,      V_ERRNO },
     75    [SYS_INTERRUPT_ENABLE] = { "interrupt_enable",      2,      V_ERRNO },
    7576
    7677    [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag",                2,      V_INTEGER },
  • uspace/lib/c/Makefile

    r84c20da r1b11576d  
    5757        generic/clipboard.c \
    5858        generic/devmap.c \
     59        generic/devman.c \
     60        generic/device/hw_res.c \
     61        generic/device/char.c \
    5962        generic/event.c \
    6063        generic/errno.c \
  • uspace/lib/c/generic/adt/dynamic_fifo.c

    r84c20da r1b11576d  
    2828
    2929/** @addtogroup libc
    30  *  @{
     30 * @{
    3131 */
    3232
     
    3434 * Dynamic first in first out positive integer queue implementation.
    3535 */
     36
     37#include <adt/dynamic_fifo.h>
    3638
    3739#include <errno.h>
    3840#include <malloc.h>
    3941#include <mem.h>
    40 
    41 #include <adt/dynamic_fifo.h>
    4242
    4343/** Internal magic value for a consistency check. */
     
    106106int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size)
    107107{
    108         int * new_items;
     108        int *new_items;
    109109
    110110        if (!dyn_fifo_is_valid(fifo))
     
    149149/** Returns and excludes the first item in the queue.
    150150 *
    151  * @param[in,out] fifoi The dynamic queue.
     151 * @param[in,out] fifo  The dynamic queue.
    152152 * @returns             Value of the first item in the queue.
    153153 * @returns             EINVAL if the queue is not valid.
     
    189189/** Clears and destroys the queue.
    190190 *
    191  *  @param[in,out] fifo         The dynamic queue.
    192  *  @returns                    EOK on success.
    193  *  @returns                    EINVAL if the queue is not valid.
     191 * @param[in,out] fifo  The dynamic queue.
     192 * @returns             EOK on success.
     193 * @returns             EINVAL if the queue is not valid.
    194194 */
    195195int dyn_fifo_destroy(dyn_fifo_ref fifo)
  • uspace/lib/c/generic/ddi.c

    r84c20da r1b11576d  
    9696}
    9797
     98/** Enable an interrupt.
     99 *
     100 * @param irq the interrupt.
     101 *
     102 * @return Zero on success, negative error code otherwise.
     103 */
     104int interrupt_enable(int irq)
     105{
     106        return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 1);
     107}
     108
     109/** Disable an interrupt.
     110 *
     111 * @param irq the interrupt.
     112 *
     113 * @return Zero on success, negative error code otherwise.
     114 */
     115int interrupt_disable(int irq)
     116{
     117        return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 0);
     118}
     119
    98120/** Enable PIO for specified I/O range.
    99121 *
  • uspace/lib/c/include/ddi.h

    r84c20da r1b11576d  
    4242extern int iospace_enable(task_id_t, void *, unsigned long);
    4343extern int pio_enable(void *, size_t, void **);
     44extern int interrupt_enable(int);
     45extern int interrupt_disable(int);
    4446
    4547#endif
  • uspace/lib/c/include/ipc/services.h

    r84c20da r1b11576d  
    4545        SERVICE_VFS,
    4646        SERVICE_DEVMAP,
     47        SERVICE_DEVMAN,
    4748        SERVICE_FHC,
    4849        SERVICE_OBIO,
  • uspace/lib/drv/Makefile

    r84c20da r1b11576d  
    2828#
    2929
    30 USPACE_PREFIX = ../../../..
    31 LIBS = $(LIBPCI_PREFIX)/libpci.a
    32 EXTRA_CFLAGS = -I$(LIBPCI_PREFIX)
    33 BINARY = pci
     30USPACE_PREFIX = ../..
     31EXTRA_CFLAGS = -Iinclude
     32LIBRARY = libdrv
    3433
    3534SOURCES = \
    36         pci.c
     35        generic/driver.c \
     36        generic/dev_iface.c \
     37        generic/remote_res.c \
     38        generic/remote_char.c
    3739
    3840include $(USPACE_PREFIX)/Makefile.common
  • uspace/srv/devman/Makefile

    r84c20da r1b11576d  
    2929
    3030USPACE_PREFIX = ../..
    31 LIBRARY = libpci
     31BINARY = devman
    3232
    3333SOURCES = \
    34         access.c \
    35         generic.c \
    36         names.c \
    37         i386-ports.c
     34        main.c \
     35        devman.c \
     36        match.c \
     37        util.c
    3838
    3939include $(USPACE_PREFIX)/Makefile.common
  • uspace/srv/fs/fat/fat_ops.c

    r84c20da r1b11576d  
    369369        unsigned blocks;
    370370        fat_dentry_t *d;
     371        dev_handle_t dev_handle;
    371372        block_t *b;
    372373        int rc;
    373374
    374375        fibril_mutex_lock(&parentp->idx->lock);
    375         bs = block_bb_get(parentp->idx->dev_handle);
     376        dev_handle = parentp->idx->dev_handle;
     377        fibril_mutex_unlock(&parentp->idx->lock);
     378
     379        bs = block_bb_get(dev_handle);
    376380        blocks = parentp->size / BPS(bs);
    377381        for (i = 0; i < blocks; i++) {
    378382                rc = fat_block_get(&b, bs, parentp, i, BLOCK_FLAGS_NONE);
    379                 if (rc != EOK) {
    380                         fibril_mutex_unlock(&parentp->idx->lock);
     383                if (rc != EOK)
    381384                        return rc;
    382                 }
    383385                for (j = 0; j < DPS(bs); j++) {
    384386                        d = ((fat_dentry_t *)b->data) + j;
     
    390392                                /* miss */
    391393                                rc = block_put(b);
    392                                 fibril_mutex_unlock(&parentp->idx->lock);
    393394                                *rfn = NULL;
    394395                                return rc;
     
    401402                                /* hit */
    402403                                fat_node_t *nodep;
    403                                 /*
    404                                  * Assume tree hierarchy for locking.  We
    405                                  * already have the parent and now we are going
    406                                  * to lock the child.  Never lock in the oposite
    407                                  * order.
    408                                  */
    409                                 fat_idx_t *idx = fat_idx_get_by_pos(
    410                                     parentp->idx->dev_handle, parentp->firstc,
    411                                     i * DPS(bs) + j);
    412                                 fibril_mutex_unlock(&parentp->idx->lock);
     404                                fat_idx_t *idx = fat_idx_get_by_pos(dev_handle,
     405                                    parentp->firstc, i * DPS(bs) + j);
    413406                                if (!idx) {
    414407                                        /*
     
    433426                }
    434427                rc = block_put(b);
    435                 if (rc != EOK) {
    436                         fibril_mutex_unlock(&parentp->idx->lock);
     428                if (rc != EOK)
    437429                        return rc;
    438                 }
    439         }
    440 
    441         fibril_mutex_unlock(&parentp->idx->lock);
     430        }
     431
    442432        *rfn = NULL;
    443433        return EOK;
  • uspace/srv/net/tl/tcp/tcp.c

    r84c20da r1b11576d  
    20332033        if (!fibril) {
    20342034                free(operation_timeout);
    2035                 return EPARTY;
     2035                return EPARTY;  /* FIXME: use another EC */
    20362036        }
    20372037//      fibril_mutex_lock(&socket_data->operation.mutex);
  • uspace/srv/vfs/vfs_ops.c

    r84c20da r1b11576d  
    13551355                int ret = vfs_close_internal(newfile);
    13561356                if (ret != EOK) {
     1357                        fibril_mutex_unlock(&oldfile->lock);
    13571358                        ipc_answer_0(rid, ret);
    13581359                        return;
     
    13611362                ret = vfs_fd_free(newfd);
    13621363                if (ret != EOK) {
     1364                        fibril_mutex_unlock(&oldfile->lock);
    13631365                        ipc_answer_0(rid, ret);
    13641366                        return;
Note: See TracChangeset for help on using the changeset viewer.