Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

c code story

Name: Anonymous 2011-12-25 0:50

this one time i went to these guys and i wall all "hey guys check out my c code" and they were all "dude your code sucks" and i was all "no dude nothing is wrong with my code" and then the guy was all "you used a break statement in nested while loops" so i said to him i says "dude thats totally legit" and hes all "dude your noob programmer if you compile that in a very specific way then there is a chance that the code wont work" so i told him right to his face that he is a faggot and wrong because my code worked and i didn't care if it wouldn't work compiled that way because maybe i won't compile it that way

and thats my story i hope you enjoyed it

Name: Anonymous 2011-12-25 0:56

>>1
lisp is shit

Name: Anonymous 2011-12-25 2:15

This is one reason I will never be a great C programmer. There's decades of idioms and gotchas you have to know about.

Name: Anonymous 2011-12-25 2:47


#define Hello int main
#define prog (){
#define I int i;
#define just for(i=0;i<5;++i)
#define ate {
#define toast printf("%s", Best Story Ever");
#define The }
#define End }

Hello prog
I just ate toast
The End

Name: Anonymous 2011-12-25 3:19

>>4
Holy fuck I love it

Name: Anonymous 2011-12-25 3:29

>>4,5
Nice syntax error
printf("%s", Best Story Ever");

Name: Anonymous 2011-12-25 13:30

If it's not C, it's shit.

Name: Anonymous 2011-12-25 13:44


#include <stdio.h>
void main(short i) {
  while(i++ < 5)
    puts("Best Story Ever");
}

omg optimized

Name: Anonymous 2011-12-25 16:06

const char msg[] = \
  "Best Story Ever\n"
  "Best Story Ever\n"
  "Best Story Ever\n"
  "Best Story Ever\n"
  "Best Story Ever\n";

int main() {asm ("int $0x80" : : "a" (4), "b" (1), "c" (msg), "d" (sizeof(msg)+1));}


OMG OPTIMIZED

Name: Anonymous 2011-12-25 16:29

>>9
Windows? Ha ha, faggot!

Name: Anonymous 2011-12-25 16:34

>>7
C is crap.

Name: Anonymous 2011-12-25 19:00

>>10
int $0x80 is a Linux system call. I have no idea what you're talking about.

Name: Anonymous 2011-12-25 19:06

Why do people declare main as int and then not return anything?

Name: Anonymous 2011-12-25 19:27

>>11
Lisp is worse shit.

Name: Anonymous 2011-12-25 20:07

>>3
Should've started when you were 12.

Name: EXPERT C PROGRAMMER 2011-12-25 20:31

#include <stdio.h>
#include <stdlib.h>

#define foreach(a, f)                                   \
    do {                                                \
        int i;                                          \
        for (i = 0; i < sizeof (a) / sizeof *(a); i++)  \
            (f)((a)[i]);                                \
    } while (0)

int main(void) {
    foreach(((char *[]){ "Best Story Ever"
                       , "Best Story Ever"
                       , "Best Story Ever"
                       , "Best Story Ever"
                       , "Best Story Ever"
                       }), puts);
    return EXIT_SUCCESS;
}

Name: Anonymous 2011-12-25 20:36

>>15
I wrote my first ANSI C compiler, when I was 12.

Name: Anonymous 2011-12-25 20:50

>>16
Bloated

Name: Anonymous 2011-12-25 20:59

So can any C experts elaborate on break statements in nested while loops because I use them all the time without a problem.

Name: >>16 2011-12-25 21:31

>>19
there is no problem?

Name: Anonymous 2011-12-25 22:16

You can avoid using break statements within loops when you design the loops to halt at a flag variable.

Name: Anonymous 2011-12-25 22:20

>>21
It makes the code look like shit
Compare

while(a) {
  while(b) {
    if(c)
      break;
    }
  }
}


to


continueProcessing = 1;
while(a) {
  while(b) {
    if(c && continueProcessing)
      continueProcessing = 0;
  }
}

Name: Anonymous 2011-12-25 22:21

No.

Name: Anonymous 2011-12-25 22:27

>>22
So write a better design.
while (!endgame)
{
  while (code==CODEBLUE)
  {
    // do stuff
    if (gameaction==PLAYERQUIT)
    {
      gameaction=CODERED;
      endgame = true;      
    }
  }
}

Name: Anonymous 2011-12-25 23:20


int i = 0;

while (1)
{
    i += 2
    if (i == 8)
    {
        break;
    }
}


I don't see anything wrong with this in terms of efficiency.

Name: Anonymous 2011-12-25 23:23

>>25

That's equivalent to:


for (int i = 0; i == 8; i += 2)
{
    continue;
}

Name: Anonymous 2011-12-25 23:39

>>26

But the while loop has to check that 1 == 1 each time it runs through the loop, whereas the for loop doesn't. So the while loop does 13 operations, whereas the for loop only does 8 operations.

A problem with the for loop is that the compiler will optimise the loop away, because it does nothing.

Name: Anonymous 2011-12-25 23:53

>>27
But the while loop has to check that 1 == 1 each time it runs through the loop
No it doesn't it's a constant expression.

A problem with the for loop is that the compiler will optimise the loop away, because it does nothing.
It alters the value of i.

Name: noko 2011-12-25 23:56

#include <stdio.h>

int main() {
  int i = 0;

  while( i < 5 ) {
    printf("%s\n", "Best story ever!");
    ++i;
  }

  return 0;
}

Name: Anonymous 2011-12-25 23:57

>>13
compiler will make it return 0 if not specified.

Name: Anonymous 2011-12-26 0:03

>>30
any behavior which varies between compilers is discouraged.

Name: Anonymous 2011-12-26 0:11

>>28

>It alters the value of i.

It's part of the loop counter though. The compiler is smart enough (or if you actually need the loop to delay, then it's stupid enough) to actually optimise it away.

Name: Anonymous 2011-12-26 0:12

>>31
no fake, but when you only use one compiler and not adding to some open source project let alone a private one they don't care.

>>27
1==1
no it doesn't, that would have to be the stupidest compiler ever to even assemble to that.


[ @ ~/host/prog/story ] $ cat st.c
#include <stdio.h>

void forloop(void)
{
    int i;
    for(i=0;i==8;++i)
        continue;
}

void whileloop(void)
{
    int i = 0;
    while(1){
        i+=2;
        if(i == 8)
            break;
    }
}


int main()
{
    forloop();
    whileloop();
}
[ Mon Dec 26 12:08:40 ]
[ @ ~/host/prog/story ] $ cat st.s
    .file    "st.c"
    .text
.globl forloop
    .type    forloop, @function
forloop:
.LFB0:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    movq    %rsp, %rbp
    .cfi_offset 6, -16
    .cfi_def_cfa_register 6
    //int i = 0;
    movl    $0, -4(%rbp)
    jmp    .L2
.L3:
    //++i
    addl    $1, -4(%rbp)
.L2:
    //i==8
    cmpl    $8, -4(%rbp)
    je    .L3//continue
    leave
    ret
    .cfi_endproc
.LFE0:
    .size    forloop, .-forloop
.globl whileloop
    .type    whileloop, @function
whileloop:
.LFB1:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    movq    %rsp, %rbp
    .cfi_offset 6, -16
    .cfi_def_cfa_register 6
    //int i = 0;
    movl    $0, -4(%rbp)
    jmp    .L7
.L9: //while(1)
    nop
.L7:
    //i+=2;
    addl    $2, -4(%rbp)
    //i==8?
    cmpl    $8, -4(%rbp)
    jne    .L9//i!=8
    nop
    leave
    ret
    .cfi_endproc
.LFE1:
    .size    whileloop, .-whileloop
.globl main
    .type    main, @function
main:
.LFB2:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    movq    %rsp, %rbp
    .cfi_offset 6, -16
    .cfi_def_cfa_register 6
    call    forloop
    call    whileloop
    leave
    ret
    .cfi_endproc
.LFE2:
    .size    main, .-main
    .ident    "GCC: (Debian 4.4.5-8) 4.4.5"
    .section    .note.GNU-stack,"",@progbits

Name: Anonymous 2011-12-26 0:21

>>33
also to add some application to the loops:

[ @ ~/host/prog/story ] $ cat st.c
#include <stdio.h>

void forloop(void)
{
    int i;
    for(i=0;i!=8;i+=2)
        puts(">>33 is a faggot");
}

void whileloop(void)
{
    int i = 0;
    while(1){
        puts(">>33 is a faggot");
        i+=2;
        if(i == 8)
            break;
    }
}


int main()
{
    forloop();
    whileloop();
}



gcc -S st.c

[ Mon Dec 26 12:19:33 ]
[ @ ~/host/prog/story ] $ cat st-O0.s
    .file    "st.c"
    .section    .rodata
.LC0:
    .string    ">>33 is a faggot"
    .text
.globl forloop
    .type    forloop, @function
forloop:
.LFB0:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    movq    %rsp, %rbp
    .cfi_offset 6, -16
    .cfi_def_cfa_register 6
    subq    $16, %rsp
    movl    $0, -4(%rbp)
    jmp    .L2
.L3:
    movl    $.LC0, %edi
    call    puts
    addl    $1, -4(%rbp)
.L2:
    cmpl    $8, -4(%rbp)
    jne    .L3
    leave
    ret
    .cfi_endproc
.LFE0:
    .size    forloop, .-forloop
.globl whileloop
    .type    whileloop, @function
whileloop:
.LFB1:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    movq    %rsp, %rbp
    .cfi_offset 6, -16
    .cfi_def_cfa_register 6
    subq    $16, %rsp
    movl    $0, -4(%rbp)
.L7:
    addl    $2, -4(%rbp)
    cmpl    $8, -4(%rbp)
    je    .L10
.L6:
    movl    $.LC0, %edi
    call    puts
    jmp    .L7
.L10:
    nop
.L9:
    leave
    ret
    .cfi_endproc
.LFE1:
    .size    whileloop, .-whileloop
.globl main
    .type    main, @function
main:
.LFB2:
    .cfi_startproc
    pushq    %rbp
    .cfi_def_cfa_offset 16
    movq    %rsp, %rbp
    .cfi_offset 6, -16
    .cfi_def_cfa_register 6
    call    forloop
    call    whileloop
    leave
    ret
    .cfi_endproc
.LFE2:
    .size    main, .-main
    .ident    "GCC: (Debian 4.4.5-8) 4.4.5"
    .section    .note.GNU-stack,"",@progbits



gcc -O3 -S st.c

[ Mon Dec 26 12:19:44 ]
[ @ ~/host/prog/story ] $ cat st.s
    .file    "st.c"
    .section    .rodata.str1.1,"aMS",@progbits,1
.LC0:
    .string    ">>33 is a faggot"
    .text
    .p2align 4,,15
.globl whileloop
    .type    whileloop, @function
whileloop:
.LFB12:
    .cfi_startproc
    subq    $8, %rsp
    .cfi_def_cfa_offset 16
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    addq    $8, %rsp
    jmp    puts
    .cfi_endproc
.LFE12:
    .size    whileloop, .-whileloop
    .p2align 4,,15
.globl forloop
    .type    forloop, @function
forloop:
.LFB11:
    .cfi_startproc
    subq    $8, %rsp
    .cfi_def_cfa_offset 16
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    addq    $8, %rsp
    jmp    puts
    .cfi_endproc
.LFE11:
    .size    forloop, .-forloop
    .p2align 4,,15
.globl main
    .type    main, @function
main:
.LFB13:
    .cfi_startproc
    subq    $8, %rsp
    .cfi_def_cfa_offset 16
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    call    puts
    movl    $.LC0, %edi
    addq    $8, %rsp
    jmp    puts
    .cfi_endproc
.LFE13:
    .size    main, .-main
    .ident    "GCC: (Debian 4.4.5-8) 4.4.5"
    .section    .note.GNU-stack,"",@progbits



As you can see with O3 the compiler is smart enough to optimize both loops to not even do a loop or any jumps and just does 4 prints and then in the main method it just does 8 prints instead of even using call on those two methods.

Name: Anonymous 2011-12-26 0:21

>>33

The for loop header should be:

[code]
for(i=0;i==8;i+=2)
[code]

You made it increment by 1.

Name: Anonymous 2011-12-26 0:23

>>35

Herp.


for(i=0;i==8;i+=2)

Name: Anonymous 2011-12-26 0:29

>>36
>>35
i noticed but didn't care to fix it.
it wouldn't make a big difference anyway.

addl    $1, -4(%rbp)
//would turn into:
addl    $2, -4(%rbp)

Name: Anonymous 2011-12-26 0:29

>>34

This isn't helpful though if you want to make the loop wait so you can flash an LED on and off on a microcontroller.

Name: Anonymous 2011-12-26 0:34

>>38
I don't see what you're getting at. The compiler will optimize both loops regardless of what you do inside if they are structured like that.

Name: Anonymous 2011-12-26 0:37

>>39

We did some microprocessor control stuff. By setting the clock multiplier to a certain value, you create a paced loop where the pacer counts to a certain number, which creates a time delay based on what the multiplier sets the clock to. If the compiler optimises the loop, wouldn't it modify the time delay to, say, make an LED flash on and off every 500ms?

Name: Anonymous 2011-12-26 0:39

>>40
Stop relying on a for loop for a shitty wait/sleep implementation.

Name: Anonymous 2011-12-26 0:45

>>40

you would have to tune parameters of the loop depending on the architecture, so may as well go to the assembly level for that.

Name: Anonymous 2011-12-26 0:47

>>42
er, processor.

Name: Anonymous 2011-12-26 7:31


#define BeginProgram void main(int argc, char *argv[])
#define CloseBrace }
#define CommandLineArgument -1
#define Declare int i,j,n,Flag=1;
#define EndOfProgram return;
#define False 0;
#define ForLoop ;for
#define GetCommandLineArgument n=atoi(argv[1]);
#define i F1ag
#define If if
#define Increment ++
#define Is ==
#define LessThan *(c&64)*
#define LessThanOrEqualTo !=
#define Modulo %
#define OpenBrace {
#define PossibleFactor j
#define PossiblePrime i
#define Possib1ePrime (c=getchar())
#define PrimeNumber (c^(!i*n%64));
#define Print putchar
#define SetTo =
#define SmallestPrime 2
#define True 1
#define Variables char c;
#define Zero i%j

BeginProgram
OpenBrace
    Declare Variables
    GetCommandLineArgument

    ForLoop (PossiblePrime SetTo SmallestPrime ;
             Possib1ePrime LessThanOrEqualTo CommandLineArgument ;
             Increment PossiblePrime)
    OpenBrace
        F1ag SetTo True
        ForLoop (PossibleFactor SetTo SmallestPrime ;
                 PossibleFactor LessThan PossiblePrime ;
                 Increment PossibleFactor)
            If (PossiblePrime Modulo PossibleFactor Is Zero)
                F1ag SetTo False

        If (Flag Is True)
            Print PrimeNumber
    CloseBrace

    EndOfProgram
CloseBrace

Name: Anonymous 2011-12-26 9:34

#define i F1ag

Name: Anonymous 2011-12-26 14:22

>>44
; inside the code story

looks ugly, would not fuck.

Name: Anonymous 2011-12-26 14:38

>>44'
#define PossibleFactor j
#define PossiblePrime i
#define Modulo %
#define Is ==
#define Zero i%j
>If (PossiblePrime Modulo PossibleFactor Is Zero)

=> if (i % j == i % j)


good code you go there

Name: Anonymous 2011-12-26 14:44


#define procedure void
#define main:(int,a0...an) main(int argc,char* argv*){
#define for for(int
#define SmallestPrime 2
#define -> ;i<
#define a(x) atoi(argv[x])+1
#define do ; {
#define end }
#define if(
#define then ){
#define mod %
#define is ==
#define := =
#define var int
#define isnt !=
#define and &&
#define or ||
#define print putchar(x);

procedure main:(int,a0...an)
  for i := SmallestPrime -> a(1) do
    var flag := 0
    for j := SmallestPrime -> sqrt(i) do
      if j isnt i and i % j is 0 then
        flag := 1
      end
    end
    if flag is 0 then
      print(i)
    end
  end
end

Name: Anonymous 2011-12-26 20:03

>>9
asm
Syntax error, ``faggot''.

Name: Anonymous 2011-12-26 20:15

>>34
#NO_APP
        .file   "st.c"
        .section        .rodata.str1.1,"aMS",@progbits,1
.LC0:
        .string ">>33 is a faggot"
        .text
        .align 1
.globl whileloop
        .type   whileloop, @function
whileloop:
        .word 0x40
        subl2 $4,%sp
        clrl %r6
.L2:
        pushab .LC0
        calls $1,puts
        addl2 $2,%r6
        cmpl %r6,$8
        jneq .L2
        ret
        .size   whileloop, .-whileloop
        .align 1
.globl forloop
        .type   forloop, @function
forloop:
        .word 0x40
        subl2 $4,%sp
        clrl %r6
.L8:
        pushab .LC0
        calls $1,puts
        addl2 $2,%r6
        cmpl %r6,$8
        jneq .L8
        ret
        .size   forloop, .-forloop
        .align 1
.globl main
        .type   main, @function
main:
        .word 0x0
        subl2 $4,%sp
        calls $0,forloop
        calls $0,whileloop
        ret
        .size   main, .-main
        .ident  "GCC: (GNU) 4.1.3 20080704 prerelease (NetBSD nb2 20081120)"

Name: Anonymous 2012-10-25 4:07

Was the consensus that it's ok to use break in nested while loops?

Name: Anonymous 2012-10-25 4:28

>>51
It is better to use a family of tail recursive functions that get compiled to jumps within the local call frame

Name: Lambda A Calculus 2012-10-25 10:51

>>13
U AIN'T RED DA STANDARD


If the return type of the main function is a type compatible with int, a return from the
initial call to the main function is equivalent to calling the exit function with the value
returned by the main function as its argument;10) reaching the } that terminates the
main function returns a value of 0. If the return type is not compatible with int, the
termination status returned to the host environment is unspecified.

Name: Anonymous 2012-10-25 11:03

>>53
This tells me that it would be safer to call EXIT_SUCCESS, in case the environment is expecting something other than an integer. I agree that it would be an extremely rare case, though.

Name: Anonymous 2012-10-25 12:57

>>54
EXIT_SUCCESS is a preprocessor macro of type int.

Name: Anonymous 2012-10-25 13:08

(Holy shit, I remember posting >>9,12. Man, I thought this thread was from 2009 or something, really. Guess time doesn't really fly at all.)

Name: Anonymous 2012-10-25 13:15

>>56
So you've been visiting prog for a year. How sad.

Name: Anonymous 2012-10-25 16:18

>>52
Redesign this program


for(i = 0; i < 10; i++) {
  while(a) {
    a = f();
    if(g(a))
      break;
  }
}

Name: Anonymous 2012-10-25 16:22

LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP
LISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISPLISP

Name: Anonymous 2012-10-25 16:23

COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE
COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE

Name: Anonymous 2012-10-25 16:24

COMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICECOMMON LISP FOR GREAT JUSTICE

Don't change these.
Name: Email:
Entire Thread Thread List