Welcome, Guest. Please login or register.

Author Topic: passing arguments to a CreateNewProc process....etc.  (Read 4915 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: passing arguments to a CreateNewProc process....etc.
« Reply #14 from previous page: August 06, 2005, 11:25:42 AM »
Quote
can't find NP_UserData tag Dietmar mentioned anywhere. I was supposing it's a tag for CreateNewProc() ? Is it an AOS3.9 only thing?

It's AROS/MorphOS thing. AmigaOS 3.x doesn't have it. No clue if AmigaOS 4 copied it.

Quote
I was also about to use the process own port but the RKM's advise against using it, saying it's for exclusively use by DOS. I guess if I use it only in the beginning before using any dos function I'll be alright?

Exactly.

Quote
Anyway, I'd prefer that NP_UserData tag, it's more practical

Too bad it's AROS/MorphOS thing.

-EDIT- MorphOS actually interherited the tag from AROS :-)
 

Offline falemagn

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 269
    • Show only replies by falemagn
    • http://www.aros.org/
Re: passing arguments to a CreateNewProc process....etc.
« Reply #15 on: August 06, 2005, 12:02:48 PM »
Quote

Too bad it's MorphOS thing.


I wouldn't bet about that ;-) (hint hint!)
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: passing arguments to a CreateNewProc process....etc.
« Reply #16 on: August 06, 2005, 12:19:14 PM »
Ahhh....Shame on 3.x for not having it... I'll use (struct Process *)->pr_MsgPort then...

[EDIT]

Actually I fell more tempted to poke tc_UserData.. :-)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: passing arguments to a CreateNewProc process....etc.
« Reply #17 on: August 06, 2005, 01:14:58 PM »
@falemagn

Oh, hehe. Right :-)

Anyway, the tag rules indeed. You get rid of that nasty sync/poking crap. Nice idea.
 

Offline Noster

  • Sr. Member
  • ****
  • Join Date: Jan 2004
  • Posts: 375
    • Show only replies by Noster
Re: passing arguments to a CreateNewProc process....etc.
« Reply #18 on: August 06, 2005, 01:15:32 PM »
Hi,

@Jose

Depending on the kind of data you want to pass you may pass them as string using NP_Arguments.
Poking tc_UserData is not much better code than using global variables in my opinion. Using messages protects from race conditions resp. you don't have to use Forbid()/Permit() (which should be avoided when ever possible).

Noster
DON\\\'T PANIC
    Douglas Adams - Hitch Hiker\\\'s Guide to the Galaxis
 

Offline Noster

  • Sr. Member
  • ****
  • Join Date: Jan 2004
  • Posts: 375
    • Show only replies by Noster
Re: passing arguments to a CreateNewProc process....etc.
« Reply #19 on: August 06, 2005, 01:21:52 PM »
Hi,

@Piru

> Anyway, the tag rules indeed. You get rid of that nasty sync/poking crap. Nice idea.

How is NP_UserData defined?

Noster
DON\\\'T PANIC
    Douglas Adams - Hitch Hiker\\\'s Guide to the Galaxis