Shop OBEX P1 Docs P2 Docs Learn Events
cog ID — Parallax Forums

cog ID

GuyvoGuyvo Posts: 21
edited 2007-09-22 12:43 in Propeller 1
Hi props,

Is it possible to get the cog ID when running a SPIN program ? (Something like the windows threadid)
Of course it can be kept in a variable set before the start of the cogs but it would be nice to get it from the propeller framework. I don't know if the cogs have a number inside the prop because they seems to be taken of the avaiable pool with the cognew().

Guy

Comments

  • hippyhippy Posts: 1,981
    edited 2007-09-22 11:41
    @ Guyvo : Have you looked at "cogid" in the Propeller manual ? Also read the "cognew" and "coginit" sections.
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-22 11:47
    Yes, please do smile.gif
  • GuyvoGuyvo Posts: 21
    edited 2007-09-22 12:43
    I'm sorry stupid question of me !
    Of course COGID returns the number of the executing COG.

    I will look manual first now wink.gif

    Thnx
    Guy
Sign In or Register to comment.