view src/os/unix/ngx_sunpro_x86.il @ 9263:388a801e9bb9 default tip

Request body: discarded body now treated as no body. Notably, proxying of such requests now uses no Content-Length instead of "Content-Length: 0", and the $content_length variable is empty (instead of "0"). This might be beneficial from correctness point of view, since requests with discarded body, such as during processing of error pages, do not pretend there is a zero-length body, but instead do not contain body at all. For example, this might be important for PUT requests, where a zero-length body could be incorrectly interpreted as a real request body. This also slightly simplifies the code.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 27 Apr 2024 18:23:52 +0300
parents 2cd019520210
children
line wrap: on
line source

/
/ Copyright (C) Igor Sysoev
/ Copyright (C) Nginx, Inc.
/

/ ngx_atomic_uint_t ngx_atomic_cmp_set(ngx_atomic_t *lock,
/     ngx_atomic_uint_t old, ngx_atomic_uint_t set);
/
/ the arguments are passed on stack (%esp), 4(%esp), 8(%esp)

        .inline ngx_atomic_cmp_set,0
        movl      (%esp), %ecx
        movl      4(%esp), %eax
        movl      8(%esp), %edx
        lock
        cmpxchgl  %edx, (%ecx)
        setz      %al
        movzbl    %al, %eax
        .end


/ ngx_atomic_int_t ngx_atomic_fetch_add(ngx_atomic_t *value,
/     ngx_atomic_int_t add);
/
/ the arguments are passed on stack (%esp), 4(%esp)

        .inline ngx_atomic_fetch_add,0
        movl      (%esp), %ecx
        movl      4(%esp), %eax
        lock
        xaddl     %eax, (%ecx)
        .end


/ ngx_cpu_pause()
/
/ the "rep; nop" is used instead of "pause" to avoid the "[ PAUSE ]" hardware
/ capability added by linker because Solaris/i386 does not know about it:
/
/ ld.so.1: nginx: fatal: hardware capability unsupported: 0x2000  [ PAUSE ]

        .inline ngx_cpu_pause,0
        rep; nop
        .end