[dylan-lang/opendylan] a2c6c6: Re-implement current-thread-id in the thread code.

GitHub <[email protected]> Sat, 16 Jan 2016 18:30:01 -0800
Newsgroups gmane.comp.lang.dylan.gwydion.cvs
Message-ID <569afca9ca6a_6f2a3fd269e532bc232064@hookshot-fe6-cp1-prd.iad.github.net.mail>
----==_mimepart_569afca9c5ca_6f2a3fd269e532bc23192f
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

  Branch: refs/heads/master
  Home:   https://github.com/dylan-lang/opendylan
  Commit: a2c6c67b5f1f6c63a015358b82612bebac48cf2b
      https://github.com/dylan-lang/opendylan/commit/a2c6c67b5f1f6c63a015358b82612bebac48cf2b
  Author: Bruce Mitchener <[email protected]>
  Date:   2016-01-16 (Sat, 16 Jan 2016)

  Changed paths:
    M documentation/library-reference/source/common-dylan/threads.rst
    M documentation/library-reference/source/system/operating-system.rst
    M documentation/release-notes/source/2016.1.rst
    M sources/common-dylan/tests/specification.dylan
    M sources/common-dylan/tests/threads/threads-spec.dylan
    M sources/dfmc/modeling/namespaces.dylan
    M sources/dylan/locks.dylan
    M sources/dylan/thread.dylan
    M sources/lib/run-time/Makefile.in
    M sources/lib/run-time/llvm-posix-threads.c
    M sources/lib/run-time/posix-threads.c
    M sources/lib/run-time/posix-threads.h
    A sources/lib/run-time/thread-utils.c
    A sources/lib/run-time/thread-utils.h
    M sources/lib/run-time/unix-threads-primitives.c
    M sources/lib/run-time/unix-threads-primitives.h
    M sources/lib/run-time/windows-threads-primitives.c
    M sources/lib/run-time/windows-threads-primitives.h
    M sources/system/arm-linux-system.lid
    M sources/system/library.dylan
    M sources/system/tests/operating-system.dylan
    M sources/system/tests/specification.dylan
    R sources/system/thread-id.c
    M sources/system/unix-operating-system.dylan
    M sources/system/x86-darwin-system.lid
    M sources/system/x86-freebsd-system.lid
    M sources/system/x86-linux-system.lid
    M sources/system/x86-netbsd-system.lid
    M sources/system/x86-win32-operating-system.dylan
    M sources/system/x86_64-darwin-system.lid
    M sources/system/x86_64-freebsd-system.lid
    M sources/system/x86_64-linux-system.lid
    M sources/system/x86_64-netbsd-system.lid

  Log Message:
  -----------
  Re-implement current-thread-id in the thread code.

This moves the current-thread-id implementation from the system library
to the actual thread implementation in the dylan library.

Now, when a thread is initialized, the thread-id is stored in a slot on
the <thread> object. A helper function current-thread-id is provided.

* documentation/library-reference/source/common-dylan/threads.rst
  (current-thread-id): Document thread-id and current-thread-id here.

* documentation/library-reference/source/system/operating-system.rst
  (current-thread-id): Remove documentation for current-thread-id.

* documentation/release-notes/source/2016.1.rst: Update to move discussion
  of current-thread-id to the appropriate section now that it has moved.

* sources/common-dylan/tests/specification.dylan
  (module-spec threads): Add thread-id and current-thread-id.

* sources/common-dylan/tests/threads/threads-spec.dylan
  (function-test thread-id, function-test current-thread-id): Add stub tests.

* sources/dfmc/modeling/namespaces.dylan
  (&module threads): Export thread-id and current-thread-id.

* sources/dylan/locks.dylan
  (current-thread-id): Rename helper function and usages to current-thread-ident.

* sources/dylan/thread.dylan
  (<thread>): Add slot for thread-id.
  (current-thread-id): Implement.

* sources/system/thread-id.c: Move to sources/lib/run-time/thread-utils.c

* sources/lib/run-time/thread-utils.h: New file.

* sources/lib/run-time/Makefile.in: Build thread-utils.c

* sources/lib/run-time/llvm-posix-threads.c
  (primitive_initialize_current_thread): Set thread_id on the thread object.
  (primitive_initialize_special_thread): Likewise.

* sources/lib/run-time/posix-threads.c
  (primitive_initialize_current_thread): Set thread_id on the thread object.

* sources/lib/run-time/posix-threads.h
  (struct DTHREAD): Add member for thread_id slot.

* sources/lib/run-time/unix-threads-primitives.c
  (primitive_initialize_current_thread): Set thread_id on the thread object.

* sources/lib/run-time/unix-threads-primitives.h
  (struct DTHREAD): Add member for thread_id slot.

* sources/lib/run-time/windows-threads-primitives.c
  (primitive_initialize_current_thread): Set thread_id on the thread object.

* sources/lib/run-time/windows-threads-primitives.h
  (struct DTHREAD): Add member for thread_id slot.

* sources/system/library.dylan
  (module operating-system): No longer export current-thread-id.

* sources/system/tests/operating-system.dylan
  (function-test current-thread-id): Remove.

* sources/system/tests/specification.dylan
  (module-spec operating-system): Remove current-thread-id.

* sources/system/unix-operating-system.dylan
  (current-thread-id): Remove.

* sources/system/x86-win32-operating-system.dylan
  (current-thread-id): Remove.

* sources/system/arm-linux-system.lid
  sources/system/x86-darwin-system.lid
  sources/system/x86-freebsd-system.lid
  sources/system/x86-linux-system.lid
  sources/system/x86-netbsd-system.lid
  sources/system/x86_64-darwin-system.lid
  sources/system/x86_64-freebsd-system.lid
  sources/system/x86_64-linux-system.lid
  sources/system/x86_64-netbsd-system.lid: No longer build thread-id.c


  Commit: e2cfdd20a0473412bfad59ffad785ebf6697df3b
      https://github.com/dylan-lang/opendylan/commit/e2cfdd20a0473412bfad59ffad785ebf6697df3b
  Author: Peter S. Housel <[email protected]>
  Date:   2016-01-16 (Sat, 16 Jan 2016)

  Changed paths:
    M documentation/library-reference/source/common-dylan/threads.rst
    M documentation/library-reference/source/system/operating-system.rst
    M documentation/release-notes/source/2016.1.rst
    M sources/common-dylan/tests/specification.dylan
    M sources/common-dylan/tests/threads/threads-spec.dylan
    M sources/dfmc/modeling/namespaces.dylan
    M sources/dylan/locks.dylan
    M sources/dylan/thread.dylan
    M sources/lib/run-time/Makefile.in
    M sources/lib/run-time/llvm-posix-threads.c
    M sources/lib/run-time/posix-threads.c
    M sources/lib/run-time/posix-threads.h
    A sources/lib/run-time/thread-utils.c
    A sources/lib/run-time/thread-utils.h
    M sources/lib/run-time/unix-threads-primitives.c
    M sources/lib/run-time/unix-threads-primitives.h
    M sources/lib/run-time/windows-threads-primitives.c
    M sources/lib/run-time/windows-threads-primitives.h
    M sources/system/arm-linux-system.lid
    M sources/system/library.dylan
    M sources/system/tests/operating-system.dylan
    M sources/system/tests/specification.dylan
    R sources/system/thread-id.c
    M sources/system/unix-operating-system.dylan
    M sources/system/x86-darwin-system.lid
    M sources/system/x86-freebsd-system.lid
    M sources/system/x86-linux-system.lid
    M sources/system/x86-netbsd-system.lid
    M sources/system/x86-win32-operating-system.dylan
    M sources/system/x86_64-darwin-system.lid
    M sources/system/x86_64-freebsd-system.lid
    M sources/system/x86_64-linux-system.lid
    M sources/system/x86_64-netbsd-system.lid

  Log Message:
  -----------
  Merge pull request #1022 from waywardmonkeys/move-current-thread-id

Re-implement current-thread-id in the thread code.


Compare: https://github.com/dylan-lang/opendylan/compare/39c5b02aee9a...e2cfdd20a047
----==_mimepart_569afca9c5ca_6f2a3fd269e532bc23192f
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
chatter mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/chatter
----==_mimepart_569afca9c5ca_6f2a3fd269e532bc23192f--