~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/appmon/src/appmon_info.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%% ``The contents of this file are subject to the Erlang Public License,
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
 
5
%% 
 
6
%% The contents of this file are subject to the Erlang Public License,
2
7
%% Version 1.1, (the "License"); you may not use this file except in
3
8
%% compliance with the License. You should have received a copy of the
4
9
%% Erlang Public License along with this software. If not, it can be
5
 
%% retrieved via the world wide web at http://www.erlang.org/.
 
10
%% retrieved online at http://www.erlang.org/.
6
11
%% 
7
12
%% Software distributed under the License is distributed on an "AS IS"
8
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
14
%% the License for the specific language governing rights and limitations
10
15
%% under the License.
11
16
%% 
12
 
%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
 
%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
 
%% AB. All Rights Reserved.''
15
 
%% 
16
 
%%     $Id$
 
17
%% %CopyrightEnd%
17
18
%%
18
19
%%----------------------------------------------------------------------
19
20
%%
469
470
 
470
471
 
471
472
%----------------------------------------------------------------------
 
473
%%---------------------------------------------------------------------
472
474
%% Handling process trees of processses that are linked to each other
473
475
 
474
476
do_find_proc(Mode, DB, GL, Avoid) ->
626
628
 
627
629
 
628
630
%----------------------------------------------------------------------
 
631
%%---------------------------------------------------------------------
629
632
%% Primitives for the database DB of all links, processes and the
630
633
%% queue of not visited yet processes.
631
634
 
636
639
    L1 = ets:new(links, [bag, public]),
637
640
    L2 = ets:new(extralinks, [bag, public]),
638
641
    Q = if
639
 
            Mode==sup -> queue:in({master, Pid}, queue:new());
 
642
            Mode =:= sup -> queue:in({master, Pid}, queue:new());
640
643
            true -> queue:in(Pid, queue:new())
641
644
        end,
642
645
    #db{q=Q, p=P, links=L1, links2=L2}.
659
662
is_proc(#db{p=Tab}, P) ->
660
663
    ets:member(Tab, P).
661
664
 
662
 
is_in_queue(#db{q={L1,L2}}, P) -> % Should really be in queue.erl
663
 
    lists:member(P, L1) orelse lists:member(P, L2).
 
665
is_in_queue(#db{q=Q}, P) ->
 
666
    queue:member(P, Q).
664
667
 
665
668
%% Group leader handling. No processes or Links to processes must be
666
669
%% added when group leaders differ. Note that catch all is needed
667
670
%% because net_sup is undefined when not networked but still present
668
 
%% in the kerenl_sup child list. Blahh, didn't like that.
 
671
%% in the kernel_sup child list. Blahh, didn't like that.
669
672
groupl(P) ->
670
673
    case process_info(P, group_leader) of
671
674
        {group_leader, GL} -> GL;