Skip to content

Defect: STAT= in LOCK/UNLOCK does not return correct code on successfull locking/unlocking #350

Open
@vehre

Description

@vehre

Defect/bug report

The implementation of lock and unlock violates the F2008+ standard, in that it should return STAT=STAT_LOCKED/UNLOCKED for LOCK(..., STAT=...) and UNLOCK(..., STAT=...), respectively.

Furthermore do I doubt that lock() implements the F2008+ standard correctly, in that it should wait that a locked lock becomes available. I assume at first glance at the code, that it doesn't.

There also is code that seems to disallow locking on self, which should be possible:
if(value == caf_this_image && image_index == caf_this_image) goto stat_error;

Lock and unlock issue undocumented stat-codes on failure.

This applies to all version of opencoarray.

This is merely a reminder to myself to implement it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions