Changes in / [89ac5513:96cbd18] in mainline


Ignore:
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    r89ac5513 r96cbd18  
    116116        $(USPACE_PATH)/srv/net/inetsrv/inetsrv \
    117117        $(USPACE_PATH)/srv/net/loopip/loopip \
    118         $(USPACE_PATH)/srv/net/slip/slip \
    119118        $(USPACE_PATH)/srv/net/tcp/tcp \
    120119        $(USPACE_PATH)/srv/net/udp/udp \
  • uspace/Makefile

    r89ac5513 r96cbd18  
    8888        srv/net/inetsrv \
    8989        srv/net/loopip \
    90         srv/net/slip \
    9190        srv/net/tcp \
    9291        srv/net/udp \
  • uspace/drv/char/ns8250/ns8250.c

    r89ac5513 r96cbd18  
    160160        /** I/O registers **/
    161161        ns8250_regs_t *regs;
    162         /** Are there any clients connected to the device? */
    163         unsigned client_connections;
     162        /** Is there any client connected to the device? */
     163        bool client_connected;
    164164        /** The irq assigned to this device. */
    165165        int irq;
     
    753753                        uint8_t val = ns8250_read_8(regs);
    754754                       
    755                         if (ns->client_connections > 0) {
     755                        if (ns->client_connected) {
    756756                                bool buf_was_empty = buf_is_empty(&ns->input_buffer);
    757757                                if (!buf_push_back(&ns->input_buffer, val)) {
     
    914914       
    915915        fibril_mutex_lock(&ns->mutex);
    916                 if (ns->client_connections > 0) {
     916        if (ns->client_connected) {
    917917                fibril_mutex_unlock(&ns->mutex);
    918918                return EBUSY;
     
    948948       
    949949        fibril_mutex_lock(&ns->mutex);
    950         if (ns->removed) {
     950        if (ns->client_connected) {
     951                res = ELIMIT;
     952        } else if (ns->removed) {
    951953                res = ENXIO;
    952954        } else {
    953955                res = EOK;
    954                 ns->client_connections++;
     956                ns->client_connected = true;
    955957        }
    956958        fibril_mutex_unlock(&ns->mutex);
     
    972974        fibril_mutex_lock(&data->mutex);
    973975       
    974         assert(data->client_connections > 0);
    975        
    976         if (!(--data->client_connections))
    977                 buf_clear(&data->input_buffer);
     976        assert(data->client_connected);
     977       
     978        data->client_connected = false;
     979        buf_clear(&data->input_buffer);
    978980       
    979981        fibril_mutex_unlock(&data->mutex);
Note: See TracChangeset for help on using the changeset viewer.