Changes in / [96cbd18:89ac5513] in mainline
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
r96cbd18 r89ac5513 116 116 $(USPACE_PATH)/srv/net/inetsrv/inetsrv \ 117 117 $(USPACE_PATH)/srv/net/loopip/loopip \ 118 $(USPACE_PATH)/srv/net/slip/slip \ 118 119 $(USPACE_PATH)/srv/net/tcp/tcp \ 119 120 $(USPACE_PATH)/srv/net/udp/udp \ -
uspace/Makefile
r96cbd18 r89ac5513 88 88 srv/net/inetsrv \ 89 89 srv/net/loopip \ 90 srv/net/slip \ 90 91 srv/net/tcp \ 91 92 srv/net/udp \ -
uspace/drv/char/ns8250/ns8250.c
r96cbd18 r89ac5513 160 160 /** I/O registers **/ 161 161 ns8250_regs_t *regs; 162 /** Is there any clientconnected to the device? */163 bool client_connected;162 /** Are there any clients connected to the device? */ 163 unsigned client_connections; 164 164 /** The irq assigned to this device. */ 165 165 int irq; … … 753 753 uint8_t val = ns8250_read_8(regs); 754 754 755 if (ns->client_connect ed) {755 if (ns->client_connections > 0) { 756 756 bool buf_was_empty = buf_is_empty(&ns->input_buffer); 757 757 if (!buf_push_back(&ns->input_buffer, val)) { … … 914 914 915 915 fibril_mutex_lock(&ns->mutex); 916 if (ns->client_connected) {916 if (ns->client_connections > 0) { 917 917 fibril_mutex_unlock(&ns->mutex); 918 918 return EBUSY; … … 948 948 949 949 fibril_mutex_lock(&ns->mutex); 950 if (ns->client_connected) { 951 res = ELIMIT; 952 } else if (ns->removed) { 950 if (ns->removed) { 953 951 res = ENXIO; 954 952 } else { 955 953 res = EOK; 956 ns->client_connect ed = true;954 ns->client_connections++; 957 955 } 958 956 fibril_mutex_unlock(&ns->mutex); … … 974 972 fibril_mutex_lock(&data->mutex); 975 973 976 assert(data->client_connect ed);977 978 data->client_connected = false;979 buf_clear(&data->input_buffer);974 assert(data->client_connections > 0); 975 976 if (!(--data->client_connections)) 977 buf_clear(&data->input_buffer); 980 978 981 979 fibril_mutex_unlock(&data->mutex);
Note:
See TracChangeset
for help on using the changeset viewer.