<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/stdlib/src, branch R16B02_yielding_binary_to_term</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Execution of system tasks in context of another process</title>
<updated>2013-11-18T19:12:35+00:00</updated>
<author>
<name>Rickard Green</name>
<email>rickard@erlang.org</email>
</author>
<published>2013-10-02T08:07:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ca0425c6ff85262bc15367f5fd9cbc51cde52b20'/>
<id>ca0425c6ff85262bc15367f5fd9cbc51cde52b20</id>
<content type='text'>
A process requesting a system task to be executed in the context of
another process will be notified by a message when the task has
executed. This message will be on the form:
  {RequestType, RequestId, Pid, Result}.

A process requesting a system task to be executed can set priority
on the system task. The requester typically set the same priority
on the task as its own process priority, and by this avoiding
priority inversion. A request for execution of a system task is
made by calling the statically linked in NIF
erts_internal:request_system_task(Pid, Prio, Request). This is an
undocumented ERTS internal function that should remain so. It
should *only* be called from BIF implementations.

Currently defined system tasks are:
* garbage_collect
* check_process_code

Further system tasks can and will be implemented in the future.

The erlang:garbage_collect/[1,2] and erlang:check_process_code/[2,3]
BIFs are now implemented using system tasks. Both the
'garbage_collect' and the 'check_process_code' operations perform
or may perform garbage_collections. By doing these via the
system task functionality all garbage collect operations in the
system will be performed solely in the context of the process
being garbage collected. This makes it possible to later implement
functionality for disabling garbage collection of a process over
context switches.

Newly introduced BIFs:

* erlang:garbage_collect/2 - The new second argument is an option
  list. Introduced option:
  * {async, RequestId} - making it possible for users to issue
    asynchronous garbage collect requests.

* erlang:check_process_code/3 -  The new third argument is an
  option list. Introduced options:
  * {async, RequestId} - making it possible for users to issue
    asynchronous check process code requests.
  * {allow_gc, boolean()} - making it possible to issue requests
    that aren't allowed to garbage collect (operation will abort
    if gc should be needed).
  These options have been introduced as a preparation for
  parallelization of check_process_code operations when the
  code_server is about to purge a module.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A process requesting a system task to be executed in the context of
another process will be notified by a message when the task has
executed. This message will be on the form:
  {RequestType, RequestId, Pid, Result}.

A process requesting a system task to be executed can set priority
on the system task. The requester typically set the same priority
on the task as its own process priority, and by this avoiding
priority inversion. A request for execution of a system task is
made by calling the statically linked in NIF
erts_internal:request_system_task(Pid, Prio, Request). This is an
undocumented ERTS internal function that should remain so. It
should *only* be called from BIF implementations.

Currently defined system tasks are:
* garbage_collect
* check_process_code

Further system tasks can and will be implemented in the future.

The erlang:garbage_collect/[1,2] and erlang:check_process_code/[2,3]
BIFs are now implemented using system tasks. Both the
'garbage_collect' and the 'check_process_code' operations perform
or may perform garbage_collections. By doing these via the
system task functionality all garbage collect operations in the
system will be performed solely in the context of the process
being garbage collected. This makes it possible to later implement
functionality for disabling garbage collection of a process over
context switches.

Newly introduced BIFs:

* erlang:garbage_collect/2 - The new second argument is an option
  list. Introduced option:
  * {async, RequestId} - making it possible for users to issue
    asynchronous garbage collect requests.

* erlang:check_process_code/3 -  The new third argument is an
  option list. Introduced options:
  * {async, RequestId} - making it possible for users to issue
    asynchronous check process code requests.
  * {allow_gc, boolean()} - making it possible to issue requests
    that aren't allowed to garbage collect (operation will abort
    if gc should be needed).
  These options have been introduced as a preparation for
  parallelization of check_process_code operations when the
  code_server is about to purge a module.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix variable usage tracking in some record errors</title>
<updated>2013-08-27T14:15:21+00:00</updated>
<author>
<name>Anthony Ramine</name>
<email>n.oxyde@gmail.com</email>
</author>
<published>2013-07-31T08:31:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=92460f4035e369be8726c88a72055d0fd6c7cdfe'/>
<id>92460f4035e369be8726c88a72055d0fd6c7cdfe</id>
<content type='text'>
When reporting a field redefinition in a record, erl_lint can forget
about some old unused variables.

f() -&gt; X = 1, #r{a=foo,a=bar,a=qux}.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When reporting a field redefinition in a record, erl_lint can forget
about some old unused variables.

f() -&gt; X = 1, #r{a=foo,a=bar,a=qux}.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unsafe variable tracking in try expressions</title>
<updated>2013-08-27T14:15:21+00:00</updated>
<author>
<name>Anthony Ramine</name>
<email>n.oxyde@gmail.com</email>
</author>
<published>2013-07-22T19:41:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=9ce148b1059e4da746a11f1d80a653340216c468'/>
<id>9ce148b1059e4da746a11f1d80a653340216c468</id>
<content type='text'>
Variables used in the body of a try expression were marked as unsafe
*and* used, which makes no sense as an unsafe variable can't be used.

Function vtsubtract/2 is used to forget usage of such unsafe variables.

Reported-by: Paul Davis
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Variables used in the body of a try expression were marked as unsafe
*and* used, which makes no sense as an unsafe variable can't be used.

Function vtsubtract/2 is used to forget usage of such unsafe variables.

Reported-by: Paul Davis
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix variable usage tracking in erl_lint</title>
<updated>2013-08-27T14:15:21+00:00</updated>
<author>
<name>Anthony Ramine</name>
<email>n.oxyde@gmail.com</email>
</author>
<published>2013-06-05T23:34:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f846bf70b0c97ce66f29b0ff88a50316924bf34e'/>
<id>f846bf70b0c97ce66f29b0ff88a50316924bf34e</id>
<content type='text'>
When analyzing complex expressions (i.e. comprehensions, cases, tries,
ifs and receives), erl_lint does not forget about old unused variables
when returning the updated variable table. This causes a bug where old
unused variables are not recorded as such:

t(X, Y) -&gt;
  #r{a=[ K || K &lt;- Y ],b=[ K || K &lt;- Y ]}.

As erl_lint uses vtmerge_pat/2 to merge the results of the analysis of
the two list comprehensions, X is marked as used and the warning is not
emitted.

The function vtmerge_pat/2 is used instead of the similar vtmerge/2
which does not mark multiple occurrences of a variable as usage to
handle cases like the following one:

t(X, Y) -&gt;
  #r{a=A=X,b=A=Y}.

Other simpler expressions like conses, tuples and external fun
references do not correctly follow this behaviour, e.g. A is not marked
as used in the following code:

t(X, Y) -&gt;
  {A=X,A=Y}.

This commit fixes both issues and makes erl_lint not return old unused
variables in updated tables and makes all compound expressions use
vtmerge_pat/2.

Reported-by: Anders Ramsell
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When analyzing complex expressions (i.e. comprehensions, cases, tries,
ifs and receives), erl_lint does not forget about old unused variables
when returning the updated variable table. This causes a bug where old
unused variables are not recorded as such:

t(X, Y) -&gt;
  #r{a=[ K || K &lt;- Y ],b=[ K || K &lt;- Y ]}.

As erl_lint uses vtmerge_pat/2 to merge the results of the analysis of
the two list comprehensions, X is marked as used and the warning is not
emitted.

The function vtmerge_pat/2 is used instead of the similar vtmerge/2
which does not mark multiple occurrences of a variable as usage to
handle cases like the following one:

t(X, Y) -&gt;
  #r{a=A=X,b=A=Y}.

Other simpler expressions like conses, tuples and external fun
references do not correctly follow this behaviour, e.g. A is not marked
as used in the following code:

t(X, Y) -&gt;
  {A=X,A=Y}.

This commit fixes both issues and makes erl_lint not return old unused
variables in updated tables and makes all compound expressions use
vtmerge_pat/2.

Reported-by: Anders Ramsell
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'sze/edlin_understand_keys/OTP-11251' into maint</title>
<updated>2013-08-26T08:27:30+00:00</updated>
<author>
<name>Fredrik Gustafsson</name>
<email>fredrik@erlang.org</email>
</author>
<published>2013-08-26T08:27:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5e2876e4524eb7de61a6d3661e0bfe1a22472668'/>
<id>5e2876e4524eb7de61a6d3661e0bfe1a22472668</id>
<content type='text'>
* sze/edlin_understand_keys/OTP-11251:
  Added primary bootstrap
  erts: fixed documentation regarding tty and arrow keys
  make edlin understand a few important control keys
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* sze/edlin_understand_keys/OTP-11251:
  Added primary bootstrap
  erts: fixed documentation regarding tty and arrow keys
  make edlin understand a few important control keys
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'alexrp/export_edge/OTP-11266' into maint</title>
<updated>2013-08-26T08:19:09+00:00</updated>
<author>
<name>Fredrik Gustafsson</name>
<email>fredrik@erlang.org</email>
</author>
<published>2013-08-26T08:19:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=6dcd4ebc32dc0356331cb29e323a56f72e2dbaf4'/>
<id>6dcd4ebc32dc0356331cb29e323a56f72e2dbaf4</id>
<content type='text'>
* alexrp/export_edge/OTP-11266:
  Export the edge/0 type from the digraph module
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* alexrp/export_edge/OTP-11266:
  Export the edge/0 type from the digraph module
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct the specifications of io_lib:fread/2,3</title>
<updated>2013-08-21T13:53:37+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2013-08-21T11:50:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a474bdfda30a3b6a520bf2be4b4550b251095703'/>
<id>a474bdfda30a3b6a520bf2be4b4550b251095703</id>
<content type='text'>
Thanks to Chris King and Kostis Sagonas for pinpointing the bug.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks to Chris King and Kostis Sagonas for pinpointing the bug.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'hb/stdlib/dets_bugfix/OTP-11245' into maint</title>
<updated>2013-08-21T07:40:31+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2013-08-21T07:40:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5960967a506c2eeadb3cbf66a1e21fff5000f08b'/>
<id>5960967a506c2eeadb3cbf66a1e21fff5000f08b</id>
<content type='text'>
* hb/stdlib/dets_bugfix/OTP-11245:
  Fix a Dets bug concerning traversal of tables
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* hb/stdlib/dets_bugfix/OTP-11245:
  Fix a Dets bug concerning traversal of tables
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a bug in the linter regarding the 'fun M:F/A' construct</title>
<updated>2013-08-20T13:52:48+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2013-08-20T13:52:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=063dcba4b4e9e9848886efd039ed815bd5910ec1'/>
<id>063dcba4b4e9e9848886efd039ed815bd5910ec1</id>
<content type='text'>
If the fun M:F/A construct was used erroneously the linter could
crash.

Thanks to Mikhail Sobolev for reporting the bug.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the fun M:F/A construct was used erroneously the linter could
crash.

Thanks to Mikhail Sobolev for reporting the bug.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a Dets bug concerning traversal of tables</title>
<updated>2013-08-19T09:47:23+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2013-08-03T20:01:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=4550ba795540b85d31b33cc2eda87c0e6952f222'/>
<id>4550ba795540b85d31b33cc2eda87c0e6952f222</id>
<content type='text'>
The bug was introduced in R16B.

Thanks to Manuel Durán Aguete.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bug was introduced in R16B.

Thanks to Manuel Durán Aguete.
</pre>
</div>
</content>
</entry>
</feed>
