type of NAME slot of thread-related datastructures

Bug #547095 reported by Tobias C. Rittweiler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

The name of THREAD can be an arbitrary object.

The name of MUTEX, WAITQUEUE, SEMAPHORE must be
a simple-string if given.

The name of a SB-QUEUE:QUEUE can be an arbitrary object
again.

We should canonicalize this.

I'd suggest (OR NULL SYMBOL SIMPLE-STRING).

What would be an appropriate name for DEFTYPE'ing this?

Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Tobias C. Rittweiler (tcr) wrote :

I committed this in 1.0.37.30. The type expands to SIMPLE-STRING,
which may seem restrictive. However, the rationale is that I'm also
working on whostate support, to ultimatively provide something like
what can be seen here:

    http://paste.lisp.org/display/97347

However, it's crucial that this code does not cons (whostate is set
in GET-MUTEX, CONDITION-WAIT etc.) as that would be pretty
bad especially on our stop-the-world-gc bottleneck.

So I decided to restrict the type to simple-string so these names
can just be taken for automatic WHOSTATE computation without
having to cons up new strings due to prin1-to-string or something.

Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.