403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.170.35
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/simset.c
/* Copyright (c) 2012, 2023, Oracle and/or its affiliates.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License, version 2.0,
   as published by the Free Software Foundation.

   This program is also distributed with certain software (including
   but not limited to OpenSSL) that is licensed under separate terms,
   as designated in a particular file or component or in included license
   documentation.  The authors of MySQL hereby grant you an additional
   permission to link the program and your derivative works with the
   separately licensed software that they have included with MySQL.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License, version 2.0, for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */

#include "x_platform.h"

#include <assert.h>
#include <stdio.h>

#include "simset.h"
#include "task_debug.h"
#include "x_platform.h"

/* purecov: begin deadcode */
linkage *link_first(linkage *self)
{
	return self->suc;
}


linkage *link_last(linkage *self)
{
	return self->pred;
}
/* purecov: end */
#if 0
linkage *link_extract_first(linkage *self)
{
	return link_out(self->suc);
}
#endif

linkage *link_extract_last(linkage *self)
{
	return link_out(self->pred);
}


#if 0
int	link_empty(linkage *self)
{
	return self == self->suc;
}
#endif

linkage *link_init(linkage *self, unsigned int type)
{
	/* XDBG("%s ",__func__); */
	self->type = type;
	self->suc = self->pred = self;
	LINK_SANITY_CHECK(self);
	return self;
}


linkage *link_out(linkage *self)
{
	/* XDBG("%s ",__func__); */
	if (!link_empty(self)) {
		TYPE_SANITY_CHECK(self, self->suc);
		TYPE_SANITY_CHECK(self, self->pred);
		self->suc->pred = self->pred;
		self->pred->suc = self->suc;
		self->suc = self->pred = self;
	}
	LINK_SANITY_CHECK(self);
	return self;
}



void link_follow(linkage *self, linkage *ptr)
{
	/* XDBG("%s ",__func__); */
	link_out(self);
	if (ptr) {
		TYPE_SANITY_CHECK(self, ptr);
		LINK_SANITY_CHECK(ptr);
		self->pred = ptr;
		self->suc = ptr->suc;
		self->suc->pred = ptr->suc = self;
		LINK_SANITY_CHECK(self);
	}
}



void link_precede(linkage *self, linkage *ptr)
{
	/* XDBG("%s ",__func__); */
	link_out(self);
	if (ptr) {
		TYPE_SANITY_CHECK(self, ptr);
		LINK_SANITY_CHECK(ptr);
		self->suc = ptr;
		self->pred = ptr->pred;
		self->pred->suc = ptr->pred = self;
		LINK_SANITY_CHECK(self);
	}
}



#if 0
void link_into(linkage *self, linkage *s)
{
	/* XDBG("%s ",__func__); */
	link_precede(self, s);
}
#endif
/* purecov: begin deadcode */
int	cardinal(linkage *self)
{
	int	n = 0;
	FWD_ITER(self, linkage, n++);
	return n;
}

char *dbg_linkage(linkage *self)
{
	GET_NEW_GOUT;
	PTREXP(self);
	NDBG(self->type, u);
	NDBG(cardinal(self), d);
	PTREXP(self->suc);
	PTREXP(self->pred);
	FWD_ITER(self, linkage, STRLIT("->"); PTREXP(link_iter); PTREXP(link_iter->suc); PTREXP(link_iter->pred));
	RET_GOUT;
}
/* purecov: end */
#if 0
#define FNVSTART 0x811c9dc5

/* Fowler-Noll-Vo type multiplicative hash */
unsigned int	type_hash(const char *byte)
{
	uint32_t sum = 0;
	while (*byte) {
		sum = sum * (uint32_t)0x01000193 ^ (uint32_t)(*byte);
		byte++;
	}
	return (unsigned int) sum;
}

#else
unsigned int	type_hash(const char *byte MY_ATTRIBUTE((unused)))
{
	return 0;
}

/* unsigned int	type_hash(const char *byte)
{
	unsigned int	sum = 0;
	while (*byte) {
		sum = sum * 7 + *byte++;
	}
	return sum;
} */
#endif



Youez - 2016 - github.com/yon3zu
LinuXploit