Rev 1635 | Rev 2209 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1635 | Rev 2130 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | ;; Added a timer per socket to allow delays when ;; |
14 | ;; Added a timer per socket to allow delays when ;; |
15 | ;; rx window gets below 1KB ;; |
15 | ;; rx window gets below 1KB ;; |
16 | ;; ;; |
16 | ;; ;; |
17 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
17 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 18... | Line 18... | ||
18 | 18 | ||
Line 19... | Line 19... | ||
19 | $Revision: 1288 $ |
19 | $Revision: 2130 $ |
20 | 20 | ||
21 | 21 | ||
Line 961... | Line 961... | ||
961 | cmp [ebx + SOCKET.TCBState], TCB_CLOSE_WAIT |
961 | cmp [ebx + SOCKET.TCBState], TCB_CLOSE_WAIT |
962 | je .ack |
962 | je .ack |
963 | jmp .exit |
963 | jmp .exit |
Line 964... | Line 964... | ||
964 | 964 | ||
965 | .data: |
- | |
966 | push ebx |
- | |
967 | add ebx, SOCKET.lock |
- | |
968 | call wait_mutex |
- | |
969 | pop ebx |
- | |
970 | 965 | .data: |
|
- | 966 | push ecx |
|
- | 967 | lea ecx, [ebx+SOCKET.lock] |
|
- | 968 | call mutex_lock |
|
971 | push ecx |
969 | |
972 | push ebx |
970 | push ebx |
973 | mov eax, [ebx + SOCKET.rxDataCount] |
971 | mov eax, [ebx + SOCKET.rxDataCount] |
974 | add eax, ecx |
972 | add eax, ecx |
975 | cmp eax, SOCKETBUFFSIZE - SOCKETHEADERSIZE |
973 | cmp eax, SOCKETBUFFSIZE - SOCKETHEADERSIZE |
Line 984... | Line 982... | ||
984 | add edx, 40 ; edx now points to the data |
982 | add edx, 40 ; edx now points to the data |
985 | mov esi, edx |
983 | mov esi, edx |
Line 986... | Line 984... | ||
986 | 984 | ||
987 | cld |
985 | cld |
- | 986 | rep movsb ; copy the data across |
|
988 | rep movsb ; copy the data across |
987 | |
- | 988 | lea ecx,[ebx + SOCKET.lock] |
|
Line 989... | Line 989... | ||
989 | mov [ebx + SOCKET.lock], 0 ; release mutex |
989 | call mutex_unlock |
990 | 990 | ||
991 | ; flag an event to the application |
991 | ; flag an event to the application |
Line 1029... | Line 1029... | ||
1029 | .exit: |
1029 | .exit: |
1030 | ret |
1030 | ret |
1031 | .overflow: |
1031 | .overflow: |
1032 | ; no place in buffer |
1032 | ; no place in buffer |
1033 | ; so simply restore stack and exit |
1033 | ; so simply restore stack and exit |
- | 1034 | lea ecx, [ebx + SOCKET.lock] |
|
- | 1035 | call mutex_unlock |
|
1034 | pop eax ecx |
1036 | pop eax ecx |
1035 | mov [ebx + SOCKET.lock], 0 |
- | |
1036 | ret |
1037 | ret |
1037 | endp |
1038 | endp |
Line 1038... | Line 1039... | ||
1038 | 1039 |