Ticket #1959 (closed todo: fixed)

Opened 11 years ago

Last modified 11 years ago

Configure flag for --without-threads

Reported by: whiteknight Owned by:
Priority: minor Milestone:
Component: configure Version: master
Severity: low Keywords:
Cc: fperrad Language:
Patch status: Platform: all

Description

The file t/src/atomic.t is invalid if we don't configure and build Parrot with threading support. Threading support is the default, unless we configure with the --without-threads flag. In that case, Parrot is built without thread support and the tests in t/src/atomic.t are invalid and should be skipped.

I don't see a flag in parrot_config which looks like it contains this information. There is a HAS_THREADS flag in parrot_config, but it always returns "1" whether --without-threads or not.

We need a reliable way to determine if Parrot has threading support or not.

Change History

in reply to: ↑ description   Changed 11 years ago by jkeenan

  • cc fperrad added
  • platform changed from linux to all

Replying to whiteknight:

I don't see a flag in parrot_config which looks like it contains this information. There is a HAS_THREADS flag in parrot_config, but it always returns "1" whether --without-threads or not. We need a reliable way to determine if Parrot has threading support or not.

Please see config/auto/thread.pm. It clearly allows for cases where HAS_THREADS would be set to 0. Tonight I wrote some tests in t/steps/auto/thread-01.t that explicitly test for that case. AFAICT, i_pthread is something picked up from the Perl 5 %Config.

Now it is of course possible that the thread-detection method in auto::thread is incorrect or insufficient. If so, patches welcome.

Thank you very much.

kid51

  Changed 11 years ago by nwellnhof

  • status changed from new to closed
  • resolution set to fixed

I can confirm that PARROT_HAS_THREADS doesn't get defined when configuring with --without-threads. The t/src/atomic.t issue was not config related and is fixed in 2053ac16289474a4a3eb.

Note: See TracTickets for help on using tickets.