Changeset e2b73d4f in mainline for uspace/srv
- Timestamp:
- 2010-03-21T09:25:29Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 19f857a
- Parents:
- facebd56 (diff), 4e9aaf5 (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. - Location:
- uspace/srv
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/Makefile.common
rfacebd56 re2b73d4f 64 64 all: \ 65 65 $(LIBC_PREFIX)/../../../version \ 66 $(LIBC_PREFIX)/../../../Makefile.common \ 66 67 $(LIBC_PREFIX)/../../../Makefile.config \ 67 68 $(LIBC_PREFIX)/../../../config.h \ 68 $(LIBC_PREFIX)/../../../config.defs \69 69 $(LIBS) \ 70 70 \ … … 77 77 find . -name '*.o' -follow -exec rm \{\} \; 78 78 79 build: 79 build: 80 80 81 81 -include $(DEPEND) -
uspace/srv/hid/char_mouse/chardev.c
rfacebd56 re2b73d4f 48 48 static int dev_phone; 49 49 50 #define NAME " kbd"50 #define NAME "char_mouse" 51 51 52 52 int mouse_port_init(void) -
uspace/srv/hid/char_mouse/proto/ps2.c
rfacebd56 re2b73d4f 36 36 37 37 #include <stdio.h> 38 #include <mouse_port.h> 39 #include <char_mouse.h> 38 40 #include <mouse_proto.h> 39 #include <char_mouse.h>40 41 41 42 #define BUFSIZE 3 43 44 #define PS2_MOUSE_OUT_INIT 0xf4 45 #define PS2_MOUSE_ACK 0xfa 42 46 43 47 typedef struct { … … 67 71 int mouse_proto_init(void) 68 72 { 73 mouse_port_write(PS2_MOUSE_OUT_INIT); 69 74 return 0; 70 75 } -
uspace/srv/hid/console/Makefile
rfacebd56 re2b73d4f 32 32 .PHONY: all clean 33 33 34 all: $(LIBC_PREFIX)/../../../Makefile.co nfig $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs$(LIBS)34 all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS) 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) -
uspace/srv/hid/fb/Makefile
rfacebd56 re2b73d4f 32 32 .PHONY: all clean 33 33 34 all: $(LIBC_PREFIX)/../../../Makefile.co nfig $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs$(LIBS)34 all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS) 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) -
uspace/srv/hid/kbd/Makefile
rfacebd56 re2b73d4f 32 32 .PHONY: all clean 33 33 34 all: $(LIBC_PREFIX)/../../../Makefile.co nfig $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs$(LIBS)34 all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS) 35 35 -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV) 36 36 $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK) -
uspace/srv/hw/char/i8042/i8042.c
rfacebd56 re2b73d4f 68 68 #define i8042_KBD_TRANSLATE 0x40 69 69 70 /* Mouse constants */71 #define MOUSE_OUT_INIT 0xf472 #define MOUSE_ACK 0xfa73 70 74 71 enum { … … 177 174 async_set_interrupt_received(i8042_irq_handler); 178 175 179 /* Disable kbd, enable mouse */ 176 /* Disable kbd and aux */ 177 wait_ready(); 180 178 pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB); 181 179 wait_ready(); 182 pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB); 183 wait_ready(); 184 pio_write_8(&i8042->data, i8042_KBD_DISABLE); 185 wait_ready(); 180 pio_write_8(&i8042->data, i8042_KBD_DISABLE | i8042_AUX_DISABLE); 186 181 187 182 /* Flush all current IO */ 188 183 while (pio_read_8(&i8042->status) & i8042_OUTPUT_FULL) 189 184 (void) pio_read_8(&i8042->data); 190 191 i8042_port_write(DEVID_AUX, MOUSE_OUT_INIT);192 185 193 186 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; … … 195 188 ipc_register_irq(sysinfo_value("i8042.inr_a"), device_assign_devno(), 0, &i8042_kbd); 196 189 ipc_register_irq(sysinfo_value("i8042.inr_b"), device_assign_devno(), 0, &i8042_kbd); 197 190 printf("i8042: registered for interrupts %d and %d\n", 191 sysinfo_value("i8042.inr_a"), sysinfo_value("i8042.inr_b")); 192 193 wait_ready(); 198 194 pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB); 199 195 wait_ready(); 200 196 pio_write_8(&i8042->data, i8042_KBD_IE | i8042_KBD_TRANSLATE | 201 197 i8042_AUX_IE); 202 wait_ready();203 198 204 199 return 0; … … 271 266 { 272 267 if (devid == DEVID_AUX) { 268 wait_ready(); 273 269 pio_write_8(&i8042->status, i8042_CMD_WRITE_AUX); 274 wait_ready();275 }270 } 271 wait_ready(); 276 272 pio_write_8(&i8042->data, data); 277 wait_ready();278 273 } 279 274 -
uspace/srv/loader/Makefile
rfacebd56 re2b73d4f 28 28 # 29 29 30 -include ../../../Makefile.common 30 31 -include ../../../Makefile.config 31 32 -include arch/$(UARCH)/Makefile.inc -
uspace/srv/net/Makefile
rfacebd56 re2b73d4f 27 27 # 28 28 29 include ../../../Makefile.common 29 30 include ../../../Makefile.config 30 31 -
uspace/srv/net/app/echo/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include ../../../../../Makefile.common 34 35 include ../../../../../Makefile.config 35 36 -
uspace/srv/net/app/nettest1/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include ../../../../../Makefile.common 34 35 include ../../../../../Makefile.config 35 36 -
uspace/srv/net/app/nettest2/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include ../../../../../Makefile.common 34 35 include ../../../../../Makefile.config 35 36 -
uspace/srv/net/app/ping/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include ../../../../../Makefile.common 34 35 include ../../../../../Makefile.config 35 36 -
uspace/srv/net/il/ip/ip.c
rfacebd56 re2b73d4f 895 895 ip_pseudo_header_ref header; 896 896 size_t headerlen; 897 device_id_t device_id; 897 898 898 899 *answer_count = 0; … … 921 922 case NET_IP_GET_ROUTE: 922 923 ERROR_PROPAGATE(data_receive((void **) &addr, &addrlen)); 923 ERROR_PROPAGATE(ip_get_route_req(0, IP_GET_PROTOCOL(call), addr, (socklen_t) addrlen, IPC_SET_DEVICE(answer), &header, &headerlen)); 924 ERROR_PROPAGATE(ip_get_route_req(0, IP_GET_PROTOCOL(call), addr, (socklen_t) addrlen, 925 &device_id, &header, &headerlen)); 926 *IPC_SET_DEVICE(answer) = device_id; 924 927 *IP_SET_HEADERLEN(answer) = headerlen; 925 928 *answer_count = 2; -
uspace/srv/net/il/ip/ip_messages.h
rfacebd56 re2b73d4f 82 82 * @param[out] answer The message answer structure. 83 83 */ 84 #define IP_SET_HEADERLEN(answer) ( (size_t *)&IPC_GET_ARG2(*answer))84 #define IP_SET_HEADERLEN(answer) (&IPC_GET_ARG2(*answer)) 85 85 86 86 /** Returns the network mask message parameter. -
uspace/srv/net/messages.h
rfacebd56 re2b73d4f 391 391 * @param[out] answer The message answer structure. 392 392 */ 393 #define IPC_SET_DEVICE(answer) ( (device_id_t *)&IPC_GET_ARG1(*answer))393 #define IPC_SET_DEVICE(answer) (&IPC_GET_ARG1(*answer)) 394 394 395 395 /** Sets the minimum address length in the message answer. 396 396 * @param[out] answer The message answer structure. 397 397 */ 398 #define IPC_SET_ADDR(answer) ( (size_t *)&IPC_GET_ARG1(*answer))398 #define IPC_SET_ADDR(answer) (&IPC_GET_ARG1(*answer)) 399 399 400 400 /*@}*/ … … 407 407 * @param[out] answer The message answer structure. 408 408 */ 409 #define IPC_SET_PREFIX(answer) ( (size_t *)&IPC_GET_ARG2(*answer))409 #define IPC_SET_PREFIX(answer) (&IPC_GET_ARG2(*answer)) 410 410 411 411 /*@}*/ … … 418 418 * @param[out] answer The message answer structure. 419 419 */ 420 #define IPC_SET_CONTENT(answer) ( (size_t *)&IPC_GET_ARG3(*answer))420 #define IPC_SET_CONTENT(answer) (&IPC_GET_ARG3(*answer)) 421 421 422 422 /*@}*/ … … 429 429 * @param[out] answer The message answer structure. 430 430 */ 431 #define IPC_SET_SUFFIX(answer) ( (size_t *)&IPC_GET_ARG4(*answer))431 #define IPC_SET_SUFFIX(answer) (&IPC_GET_ARG4(*answer)) 432 432 433 433 /*@}*/ -
uspace/srv/net/net/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include $(NET_BASE)../../../Makefile.common 34 35 include $(NET_BASE)../../../Makefile.config 35 36 -
uspace/srv/net/net/start/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include ../../../../../Makefile.common 34 35 include ../../../../../Makefile.config 35 36 -
uspace/srv/net/netif/dp8390/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include $(NET_BASE)../../../Makefile.common 34 35 include $(NET_BASE)../../../Makefile.config 35 36 -
uspace/srv/net/netif/lo/Makefile
rfacebd56 re2b73d4f 32 32 STRUCTURES = $(NET_BASE)structures/ 33 33 34 include $(NET_BASE)../../../Makefile.common 34 35 include $(NET_BASE)../../../Makefile.config 35 36 -
uspace/srv/net/socket/socket_messages.h
rfacebd56 re2b73d4f 115 115 * @param[out] answer The message answer structure. 116 116 */ 117 #define SOCKET_SET_SOCKET_ID(answer) (int *)&IPC_GET_ARG1(answer)117 #define SOCKET_SET_SOCKET_ID(answer) &IPC_GET_ARG1(answer) 118 118 119 119 /** Returns the socket identifier message parameter. 120 120 * @param[in] call The message call structure. 121 121 */ 122 #define SOCKET_GET_SOCKET_ID(call) 122 #define SOCKET_GET_SOCKET_ID(call) (int) IPC_GET_ARG1(call) 123 123 124 124 /** Sets the read data length in the message answer. 125 125 * @param[out] answer The message answer structure. 126 126 */ 127 #define SOCKET_SET_READ_DATA_LENGTH(answer) (int *)&IPC_GET_ARG1(answer)127 #define SOCKET_SET_READ_DATA_LENGTH(answer) &IPC_GET_ARG1(answer) 128 128 129 129 /** Returns the read data length message parameter. 130 130 * @param[in] call The message call structure. 131 131 */ 132 #define SOCKET_GET_READ_DATA_LENGTH(call) 132 #define SOCKET_GET_READ_DATA_LENGTH(call) (int) IPC_GET_ARG1(call) 133 133 134 134 /** Returns the backlog message parameter. 135 135 * @param[in] call The message call structure. 136 136 */ 137 #define SOCKET_GET_BACKLOG(call) 137 #define SOCKET_GET_BACKLOG(call) (int) IPC_GET_ARG2(call) 138 138 139 139 /** Returns the option level message parameter. 140 140 * @param[in] call The message call structure. 141 141 */ 142 #define SOCKET_GET_OPT_LEVEL(call) 142 #define SOCKET_GET_OPT_LEVEL(call) (int) IPC_GET_ARG2(call) 143 143 144 144 /** Returns the data fragment size message parameter. … … 150 150 * @param[out] answer The message answer structure. 151 151 */ 152 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer) (size_t *)&IPC_GET_ARG2(answer)152 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer) &IPC_GET_ARG2(answer) 153 153 154 154 /** Sets the address length in the message answer. 155 155 * @param[out] answer The message answer structure. 156 156 */ 157 #define SOCKET_SET_ADDRESS_LENGTH(answer) (socklen_t *)&IPC_GET_ARG3(answer)157 #define SOCKET_SET_ADDRESS_LENGTH(answer) &IPC_GET_ARG3(answer) 158 158 159 159 /** Returns the address length message parameter. … … 165 165 * @param[out] answer The message answer structure. 166 166 */ 167 #define SOCKET_SET_HEADER_SIZE(answer) (int *)&IPC_GET_ARG3(answer)167 #define SOCKET_SET_HEADER_SIZE(answer) &IPC_GET_ARG3(answer) 168 168 169 169 /** Returns the header size message parameter. 170 170 * @param[in] call The message call structure. 171 171 */ 172 #define SOCKET_GET_HEADER_SIZE(call) (int) IPC_GET_ARG3(call)172 #define SOCKET_GET_HEADER_SIZE(call) (size_t) IPC_GET_ARG3(call) 173 173 174 174 /** Returns the flags message parameter. 175 175 * @param[in] call The message call structure. 176 176 */ 177 #define SOCKET_GET_FLAGS(call) 177 #define SOCKET_GET_FLAGS(call) (int) IPC_GET_ARG4(call) 178 178 179 179 /** Returns the option name message parameter. 180 180 * @param[in] call The message call structure. 181 181 */ 182 #define SOCKET_GET_OPT_NAME(call) 182 #define SOCKET_GET_OPT_NAME(call) (int) IPC_GET_ARG4(call) 183 183 184 184 /** Returns the data fragments message parameter. -
uspace/srv/net/tl/tcp/tcp.c
rfacebd56 re2b73d4f 1060 1060 int app_phone = IPC_GET_PHONE(&call); 1061 1061 struct sockaddr * addr; 1062 int socket_id; 1062 1063 size_t addrlen; 1063 1064 fibril_rwlock_t lock; … … 1104 1105 socket_data->local_sockets = &local_sockets; 1105 1106 fibril_rwlock_write_lock(&lock); 1106 *SOCKET_SET_SOCKET_ID(answer) = SOCKET_GET_SOCKET_ID(call); 1107 res = socket_create(&local_sockets, app_phone, socket_data, SOCKET_SET_SOCKET_ID(answer)); 1107 socket_id = SOCKET_GET_SOCKET_ID(call); 1108 res = socket_create(&local_sockets, app_phone, socket_data, &socket_id); 1109 *SOCKET_SET_SOCKET_ID(answer) = socket_id; 1108 1110 fibril_rwlock_write_unlock(&lock); 1109 1111 if(res == EOK){ -
uspace/srv/net/tl/udp/udp.c
rfacebd56 re2b73d4f 417 417 int app_phone = IPC_GET_PHONE(&call); 418 418 struct sockaddr * addr; 419 int socket_id; 419 420 size_t addrlen; 420 421 ipc_call_t answer; … … 451 452 break; 452 453 case NET_SOCKET: 453 *SOCKET_SET_SOCKET_ID(answer) = SOCKET_GET_SOCKET_ID(call); 454 res = socket_create(&local_sockets, app_phone, NULL, SOCKET_SET_SOCKET_ID(answer)); 454 socket_id = SOCKET_GET_SOCKET_ID(call); 455 res = socket_create(&local_sockets, app_phone, NULL, &socket_id); 456 *SOCKET_SET_SOCKET_ID(answer) = socket_id; 457 455 458 if(res == EOK){ 456 459 if(tl_get_ip_packet_dimension(udp_globals.ip_phone, &udp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){
Note:
See TracChangeset
for help on using the changeset viewer.