// File: yangwanyuan[P]HLKVDS/src/Segment.cc
// Function: hlkvds::SegForReq::Notify(bool)
void SegForReq::Notify(bool stat) {
    std::lock_guard < std::mutex > l(mtx_);

    //Set logic timestamp to hashentry
    reqCommited_.store(GetKeyNum());

    int32_t keyNo = 0;
    persistTime_.Update();
    for (list<Request *>::iterator iter = reqList_.begin(); iter
            != reqList_.end(); iter++) {
        keyNo++;
        KVSlice *slice = &(*iter)->GetSlice();
        HashEntry &entry = slice->GetHashEntry();
        entry.SetLogicStamp(persistTime_, keyNo);

        if (!slice->GetData()) {
            delReqList_.push_back(entry);
        }
    }

    //notify and clean req.
    while (!reqList_.empty()) {
        Request *req = reqList_.front();
        reqList_.pop_front();
        req->SetWriteStat(stat);
        req->Signal();
    }

}

// Assembly:
subq $0xd8, %rsp
movb %sil, %al
movq %rdi, 0xb8(%rsp)
andb $0x1, %al
movb %al, 0xb7(%rsp)
movq 0xb8(%rsp), %rsi
movq %rsi, 0x40(%rsp)
addq $0x98, %rsi
leaq 0xa8(%rsp), %rdi
callq 0xb5f0
movq 0x40(%rsp), %rdi
movq %rdi, %rax
addq $0x7c, %rax
movq %rax, 0x48(%rsp)
callq 0x44420
movl %eax, 0x54(%rsp)
jmp 0x42d68
movl 0x54(%rsp), %eax
movq 0x48(%rsp), %rcx
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
movl $0x5, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0xc8(%rsp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x194f0
movl %eax, 0xc4(%rsp)
movl 0xc8(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0xcc(%rsp), %ecx
movl %ecx, 0xc0(%rsp)
subl $0x3, %eax
je 0x42deb
jmp 0x42dd0
movl 0x3c(%rsp), %eax
subl $0x5, %eax
je 0x42dfb
jmp 0x42ddb
movq 0x30(%rsp), %rax
movl 0xc0(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x42e09
movq 0x30(%rsp), %rax
movl 0xc0(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x42e09
movq 0x30(%rsp), %rcx
movl 0xc0(%rsp), %eax
xchgl %eax, (%rcx)
movq 0x40(%rsp), %rdi
movl $0x0, 0x98(%rsp)
addq $0x68, %rdi
callq 0x50710
jmp 0x42e24
movq 0x40(%rsp), %rdi
addq $0x80, %rdi
callq 0x44490
movq %rax, 0x90(%rsp)
movq 0x40(%rsp), %rdi
addq $0x80, %rdi
callq 0x444e0
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x444c0
testb $0x1, %al
jne 0x42e74
jmp 0x42f9c
movl 0x98(%rsp), %eax
incl %eax
movl %eax, 0x98(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x44510
movq (%rax), %rdi
callq 0x16a90
movq %rax, 0x28(%rsp)
jmp 0x42ea0
movq 0x28(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x116b0
movq %rax, 0x20(%rsp)
jmp 0x42ec1
movq 0x40(%rsp), %rsi
movq 0x20(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
addq $0x68, %rsi
leaq 0x68(%rsp), %rdi
callq 0x50750
jmp 0x42eea
movq 0x18(%rsp), %rdi
movl 0x98(%rsp), %edx
leaq 0x68(%rsp), %rsi
callq 0x25590
jmp 0x42f02
leaq 0x68(%rsp), %rdi
callq 0x50920
movq 0x80(%rsp), %rdi
callq 0x23a40
movq %rax, 0x10(%rsp)
jmp 0x42f20
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
jne 0x42f81
movq 0x40(%rsp), %rdi
addq $0xc0, %rdi
movq 0x78(%rsp), %rsi
callq 0x44530
jmp 0x42f43
jmp 0x42f81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x43016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x50920
jmp 0x43016
jmp 0x42f83
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0x44570
movq %rax, 0x60(%rsp)
jmp 0x42e3d
jmp 0x42f9e
movq 0x40(%rsp), %rdi
addq $0x80, %rdi
callq 0x445a0
xorb $-0x1, %al
testb $0x1, %al
jne 0x42fb7
jmp 0x43001
movq 0x40(%rsp), %rdi
subq $-0x80, %rdi
movq %rdi, 0x8(%rsp)
callq 0x445c0
movq 0x8(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x58(%rsp)
callq 0x445f0
movq 0x58(%rsp), %rdi
movzbl 0xb7(%rsp), %esi
andl $0x1, %esi
callq 0x415a0
jmp 0x42ff3
movq 0x58(%rsp), %rdi
callq 0x41660
jmp 0x42fff
jmp 0x42f9e
leaq 0xa8(%rsp), %rdi
callq 0xb830
addq $0xd8, %rsp
retq
leaq 0xa8(%rsp), %rdi
callq 0xb830
movq 0xa0(%rsp), %rdi
callq 0x8820